Click to See Complete Forum and Search --> : Destructors


darwen
December 17th, 2003, 05:26 PM
When writing __gc classes for .NET (more specifically in an assembly) are the destructors of classes ever called ?

I've tried the debugger, and TRACE but it's giving me nothing.

I need to know this. I'm going to do the vast majority of my programming in .NET but I need to know if I do need to drop into unmanaged code that the destructor will be called to release this memory.

Darwen.

MooNull
December 19th, 2003, 01:06 AM
I would bet most __gc classes in the framework have virtual destructors.

If you want to clean stuff up, call GC::Collect().