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.
| ||
|
Tuesday, January 4, 2011
How to get an object garbage collected
Labels:
.NET Framework
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment