A case of the AWAL Destructor.

Is it a Memory leak or a Resource leak.

It would seem that if you take a c++ managed extensions gc class containing a native pointer to dot net 2.0.  The classes finalization does not happen correctly.  Ie the destructor is no longer invoked.

further more if you migrate said c++ code to c++/cli then your destructor will not get called when the managed object is disposed of via garbage collection.  You will need to either explicitly call the destructor or add a finalize to your reference class.

 

Not the most obvious memory leak in the world to say the least.

Comments [0]