G
Guest
I have a managed cpp wrapper. Im using this in a native dll as a static
variable. I need to free this library when the dll is done being used. The
perfect place to do this is DllMain for DLL_PROCESS_DETACH, but I can't do
this when touching managed code, even if its just calling "delete
someObject;". Any recommendations on how to free this object (it needs to be
freed when the dll is being unloaded from its caller). Since the CRT is
already spun up, I would imagine freeing an object in DllMain should be no
problem (a loader lock issue won't be a problem here.. correct?). If thats so
and this is the best way, is there a way to avoid the loader lock msgbox that
comes up? (this would be the 'Managed Debugging Assistant 'LoaderLock' has
detected a problem in...' dialog'
Thanks!
variable. I need to free this library when the dll is done being used. The
perfect place to do this is DllMain for DLL_PROCESS_DETACH, but I can't do
this when touching managed code, even if its just calling "delete
someObject;". Any recommendations on how to free this object (it needs to be
freed when the dll is being unloaded from its caller). Since the CRT is
already spun up, I would imagine freeing an object in DllMain should be no
problem (a loader lock issue won't be a problem here.. correct?). If thats so
and this is the best way, is there a way to avoid the loader lock msgbox that
comes up? (this would be the 'Managed Debugging Assistant 'LoaderLock' has
detected a problem in...' dialog'
Thanks!