Hi,
I am trying to allocate heaps of memory and keep on getting memory leaks. HeapAlloc() works, but VirtualAlloc() gives leaks:
Anyone can help to trace the leak?Code:LPSTR pRead = (LPSTR)VirtualAlloc(NULL, config.dwSendHeap+1, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); VirtualFree(pRead, config.dwSendHeap+1, MEM_DECOMMIT | MEM_RELEASE);
Thanks.




Reply With Quote