I am using ATL 8 and I am on a machine with DEP. The Visual Leak Detector reports a memory leak that is associated with calling HeapAlloc in atlthunk.cpp , specifically with this line of code:
atlThunkPool = (PSLIST_HEADER)HeapAlloc(GetProcessHeap(), 0, sizeof(SLIST_HEADER));
And, of course, I was looking for a watch, but I could not find the corresponding HeapFree anywhere. In addition, there is a call to VirtualAlloc in the same file, i.e.
thunkPage = (PATL_THUNK_ENTRY)VirtualAlloc(NULL, PAGE_SIZE, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
And there is no corresponding VirtualFree (except for certain conditions). Am I losing my mind or is this an ATL bug?
Thanks.
source share