Boost logo

Boost Users :

From: Drew (drewtenn_at_[hidden])
Date: 2003-08-20 10:25:58


I originally posted this to microsoft.public.dotnet.languages.vc,
but they referred me back to here.

Has anyone used boost's intrusive_ptr with Managed C++ extensions?

I have a small project where the executable (managed) is linked to a
native C++ dll.

The code looks like:

int _tmain()
{
  boost::intrusive_ptr<Unmanaged> pUn = __nogc new Unmanaged();

  return 0;
}

when I exit out of main, boost::intrusive_ptr_release() throws an
exception. The last known method called is:

UnmanagedLib.dll!_CrtIsValidHeapPointer(...) Line 1807

but when I replace my code with:

Unmanaged* pUm = new Unmanaged();
delete pUm;

no exception is thrown.

Please help!

-Drew


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net