diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2018-12-26 08:49:26 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2018-12-26 10:49:42 (GMT) |
commit | b6662b61dd83be32481a1c83e092082e9d797f0a (patch) | |
tree | fcf4bf395d5bc6de2cbf94fc78dc25bd8772a521 /src/pycode.l | |
parent | 348a8cc72dd481fa9e65e6209946bfeef5716914 (diff) | |
download | Doxygen-b6662b61dd83be32481a1c83e092082e9d797f0a.zip Doxygen-b6662b61dd83be32481a1c83e092082e9d797f0a.tar.gz Doxygen-b6662b61dd83be32481a1c83e092082e9d797f0a.tar.bz2 |
Fixed some more small memory leaks
Diffstat (limited to 'src/pycode.l')
-rw-r--r-- | src/pycode.l | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pycode.l b/src/pycode.l index dfa383f..d9c9f01 100644 --- a/src/pycode.l +++ b/src/pycode.l @@ -1091,8 +1091,7 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBUT char *s=g_curClassBases.first(); while (s) { - ClassDef *baseDefToAdd; - baseDefToAdd=g_codeClassSDict[s]; + ClassDef *baseDefToAdd=g_codeClassSDict[s]; // Try to find class in global // scope @@ -1517,6 +1516,8 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBUT void resetPythonCodeParserState() { + g_codeClassSDict.setAutoDelete(TRUE); + g_codeClassSDict.clear(); g_currentDefinition = 0; g_currentMemberDef = 0; g_doubleStringIsDoc = FALSE; @@ -1567,6 +1568,7 @@ void parsePythonCode(CodeOutputInterface &od,const char * /*className*/, //-------------------------------------- if (s.isEmpty()) return; printlex(yy_flex_debug, TRUE, __FILE__, fd ? fd->fileName().data(): NULL); + g_codeClassSDict.setAutoDelete(TRUE); TooltipManager::instance()->clearTooltips(); g_code = &od; g_inputString = s; |