c# - memory leak in Sharepoint using Console app -
i have console app uses openweb(myweb) without closing , without "using". in webpart leads memory leak. but, understand, after .exe file closing, garbage collector clean memory, is't it? or openweb() creates objects in w3w pool anywhere use it?
when process exits, os releases resources, used process. so, more accurate, resources may released not because of gc work.
if application creates 1 idisposable, uses it, , exits, resources, used idisposable disposed. but, applications more complex. so, i'd recommend use using or try/finally in small applications. @ least, won't forget call dispose somewhere later.
Comments
Post a Comment