Delete DLL object after FreeLibrary

Started by
3 comments, last by Simplicity 18 years ago
Can we delete objects created across DLL after FreeLibrary?
Advertisement
In linux (libdl), any object newed by a shared library, must be deleted by the library.
[size="2"]I like the Walrus best.
Sometimes dlls aren't unloaded until the process exits, but you shouldn't count on it. Delete the objects before calling FreeLibrary.
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
In general, I don't think you can free memory allocated in another DLL anyway without getting a page fault.
You can, just have the DLL allocate in its address space and return a pointer. Then you must have the DLL delete it also.

This topic is closed to new replies.

Advertisement