Connecting Tech Pros Worldwide Help | Site Map

Releasing the Heap Memory

Newbie
 
Join Date: Feb 2008
Posts: 31
#1: Sep 17 '09
Hi All,

We have ASP.Net based content management web application. We are performing lots of XML based operations like setting the innerxml, loading the xml, string replace operations on XML etc. As per my observation during these operations,memory keep on allocating on heap and never release untill Garbage collector gets called by system. I also set all the objects to nothing after its use, but still it is not releasing the memory. Can anybody provide a solution to release the allocated memory from the heap.

Regards
Amol Lokhande
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,066
#2: Sep 17 '09

re: Releasing the Heap Memory


Is there a "Dispose()" method for the Objects that you're using to manipulate the XML?

Dispose will force the Object to release it's resources. If you simply set the Object to null/nothing the resources may still be loaded in memory and you'll run out of resources/memory eventually.
Reply