The gospel is here:

http://www.bluebytesoftware.com/blog/PermaLink.aspx?guid=88e62cdf-5919-4ac7-bc33-20c06ae539ae

But at minimum, your System::GC::SupressFinalize(this); belongs in the
Dispose method, not the finalizer.  Of course I'm totally ouf of touch
with the Managed C++ syntax... here's a mini version in C#

class MyClass
{
   private:
       public void Dispose()
       {
         // release unmanaged resources here
         System::GC::SupressFinalize(this);
       }

       ~MyClass()
       {
              this.Dispose();
       }
   public: ...
};


--
"Under capitalism, man exploits man. Under communism, it's just the
opposite."  –John Kenneth Gailbraith

Marc C. Brooks
mailto:[EMAIL PROTECTED]
http://musingmarc.blogspot.com

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to