UHEAP_MARK is detecting memory leak in strings. Is this a known issue and is there a work around for this?
I know that openc initializes WSD on its first invocation therefore it needs to be cleaned before __UHEAP_MARKEND. Therefore I added "CleanupWSD" call. But still I am getting the memory leak.Code:int main(void) { __UHEAP_MARK; { std::string fullpath("C:\\sys\\bin\\"); fullpath += "any.exe"; // <--- Causes reallocation printf((char*)fullpath.c_str()); } #ifdef __WINSCW__ CleanupWSD();// Cleanup all WSD related allocations #endif __UHEAP_MARKEND; return 0; }
When I digged further with the help of foundation code I came to know that cleanup of the internal memory is not happening for strings. The cleanup code is defined under "_STLP_DO_CLEAN_NODE_ALLOC" macro which is not defined.
Is there a workaround so that I don't see this memory leak. I want to find other leaks in my program but because of this I am unable to proceed further.




