Link to home
Start Free TrialLog in
Avatar of vsaravana
vsaravana

asked on

Unicode build - Memory leaks

I have an C++(MFC) application built in non-unicode that tries to load a DLL(with MFC support). The
DLL has been compiled in UNICODE.
When I load the library and unload it I seem to get the meory leaks.

Detected memory leaks!
Dumping objects ->
{68} client block at 0x01F51730, subtype 0, 68 bytes long.
a CDynLinkLibrary object at $01F51730, 68 bytes long
a CDynLinkLibrary object at $01F51730, 68 bytes long
{63} client block at 0x01F515E0, subtype 0, 68 bytes long.
a CDynLinkLibrary object at $01F515E0, 68 bytes long
a CDynLinkLibrary object at $01F515E0, 68 bytes long
{61} client block at 0x01F514C0, subtype 0, 68 bytes long.
a CDynLinkLibrary object at $01F514C0, 68 bytes long
a CDynLinkLibrary object at $01F514C0, 68 bytes long
Object dump complete.


However if I remove the UNICODE support( by removing _UNICODE, UNICODE from pre processor definition)
for my DLL the memory leaks seems to go off.


Is there any suggestion on how to remove the memory leak. Can I use any APIs to clean up the memory
if I use UNICODE. For circumstances I cannot remove the UNICODE support for the DLL (or) add
UNICODE support for my Exe application.
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial