X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/08c6402af6c3eb12f3d0d5d37a95904c838f9b60..341479ffb94bb84364a8161437ac635ac5b44ebb:/utils/tex2rtf/src/texutils.cpp diff --git a/utils/tex2rtf/src/texutils.cpp b/utils/tex2rtf/src/texutils.cpp index 35ff57107e..f3c25d42b7 100644 --- a/utils/tex2rtf/src/texutils.cpp +++ b/utils/tex2rtf/src/texutils.cpp @@ -432,7 +432,14 @@ void ReadTexReferences(char *filename) istr.get(ch); } section[i] = 0; + + // gt - needed to trick the hash table "TexReferences" into deleting the key + // strings it creates in the Put() function, but not the item that is + // created here, as that is destroyed elsewhere. Without doing this, there + // were massive memory leaks + TexReferences.DeleteContents(TRUE); TexReferences.Put(label, new TexRef(label, file, section, sectionName)); + TexReferences.DeleteContents(FALSE); } } }