
debugger detects memory leak after using shellexecute
Anyone know why the VC++ de{*filter*} detects a memory leak anytime
I close a program after making a call to ShellExecute()?
Here's what I'm doing:
HINSTANCE hinst1 = ShellExecute(GetSafeHwnd(), "open", "notepad.exe", NULL,
"c:\\windows", SW_SHOW);
I get two different messages from the de{*filter*}. Sometimes, I get this:
Dumping objects ->
{16926} normal block at 0x006875C4, 512 bytes long.
Data: < > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
Object dump complete.
Sometimes I get this:
Dumping objects ->
tooltip.cpp(341) : {16943} client block at 0x00681CCC, subtype 0, 92 bytes long.
a CToolTipCtrl object at $00681CCC, 92 bytes long
{16926} normal block at 0x006875C4, 512 bytes long.
Data: < > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
Object dump complete.
I haven't been able to discern any pattern in when I receive these messages. It
doesn't matter how many times ShellExecute gets called, I never get any other
leaks. Oh, and sometimes I don't get any leak warnings at all.
I'm not allocating anything on the heap in the function. The memory leak does
not occur unless ShellExecute() is called.
Any help would be greatly appreciated.
ashley