I know that if your static DLL links are against a different version of the runtime, then it creates its own heap. It will also be if he is tasked with making a bunch. In these circumstances, it is not safe for a DLL to delete what is allocated by exe. In what cases does this NOT apply (for example, is it safe to delete a DLL that is allocated by exe)? Is it safe that both exe and the static link DLL for the same runtime library?
thank
Basically, there is a way so that the one who allocated it could just do addEvent(new DerivedEvent(), FunctorDestroyClass());
addEvent(new DerivedEvent(), FunctorDestroyClass());
, , , , DLL, - :
#define DLLMemAlloc( size ) HeapAlloc( GetProcessHeap(), 0, size ) #define DLLMemFree( mem ) HeapFree( GetProcessHeap(), 0, mem )
( ). , , .
( ), , . , , DLL , DLL ( ).
DLL , . 3 : , ( DLL, , ), , .