int ix;
LPSTR firstP;
LPSTR secondP;
while(ix < 10000)
{
firstP = (LPSTR)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 100);
secondP = (LPSTR)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 100);
firstP = secondP;
ix++;
HeapFree( GetProcessHeap(), 0, firstP );
}
如果没有泄漏,求教原因。
有吧,第一个空间没有回收啊,要没有也回复一下我