Re: [GD-Windows] new/delete across DLL's
Brought to you by:
vexxed72
From: Rich <leg...@xm...> - 2003-03-24 18:53:02
|
In article <005b01c2f233$ede559c0$7b02000a@mcaf.local>, "Javier Arevalo" <ja...@py...> writes: > If both the EXE and your DLL link with the MSVC DLL runtime, it will work > correctly because all allocations are physically performed inside the > (single instance of the) runtime DLL. I don't think this is true. Its not a matter of what runtime you use, its a matter of where you perform the allocation. We used the DLL runtime and had the exact same sort of issue reported by the original poster. Putting the deallocation inside the DLL via a helper function fixed the problem. However, the specifics are a fuzzy memory at this point. The one thing I remembered was that allocations performed by DLL code are allocated from a distinct heap. It has to be this way for the memory dynamically allocated by a DLL to survive the death of your process. -- "The Direct3D Graphics Pipeline"-- code samples, sample chapter, FAQ: <http://www.xmission.com/~legalize/book/> izfree: Open source tools for Windows Installer <http://izfree.sourceforge.net> |