20 Aug
2003
20 Aug
'03
3:25 p.m.
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