Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15785

My application clogs-up memory...

$
0
0
Hi all,

I made a CAD application where users can create projects, add pages to them and draw stuff on the pages. Naturally, as users work on their project, objects get created and the memory usage increases. The problem I have is that when the users close their project, the memory usage does not drop, even when available ram is getting stressed.

It is my understanding that the garbage collector will send an object into oblivion when if figures out there are no references to it anymore. Now through the lifetime of an object in my application, several different references will point to it at some point in time (whether it is because it is references by a UI object, or a dictionary of references used as a cash, etc.) Since the GC does not clear-up memory after a project is closed, I must assume my application still has some references to objects somewhere, even after the project closing process took place (which I thought my code made sure all objects are not referenced anymore, but I must have messed-up that part somewhere...)

Is there a way to know if an object still has references to it, and make them point to Nothing? Or is there a way to force all references to an object to point to ‘Nothing’ so that the GC can free up memory?

Thanks in advance to any solution or online resources that could help me with that.

Viewing all articles
Browse latest Browse all 15785

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>