Sometimes it's useful to detect when an object is garbage collected. Garbage collection happens in a separate thread, and if you want to display some info about this, in a Windows Forms GUI, you need to use BeginInvoke and not Invoke or your application will "freeze". Invoke will not be executed during garbage collection.
| ||
|
Thoughts on C#, .NET, programming, software development and productivity. Tips and tricks to solve various programming problems.
Tuesday, January 4, 2011
How to get an object garbage collected
Labels:
.NET Framework
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment