Boost logo

Boost Users :

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

I originally posted this to,
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!


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at