16-01-2010, 06:29 PM | #1 | |
Member
Join Date: Jan 2010
Posts: 58
Rep Power: 15 |
How to invoke or force run garbage collector in .Net??
So, how to get it working. Simple. You don't need to. .Net framework is smart enough to understand when a lot of objects are not being destroyed properly, and run this piece of code automatically. Basically its like a maid which cleans up your room without asking. But what if you still feel that this smartness of .Net garbage collector is not enough, and you still need to tell it when to do the housekeeping for you. Its very simple. Just one line of code and its done. All that you have to do is, add this line in your code where you feel to force garbage collector to run. Quote:
|
|
Bookmarks |
Tags |
.net, destroy object, garbage collector, memory, memory leak |
|
|