[cfe-commits] r62498 - /cfe/trunk/lib/Lex/Preprocessor.cpp
Ted Kremenek
kremenek at apple.com
Sun Jan 18 23:45:44 PST 2009
Author: kremenek
Date: Mon Jan 19 01:45:44 2009
New Revision: 62498
URL: http://llvm.org/viewvc/llvm-project?rev=62498&view=rev
Log:
Run destructors of MacroInfo objects to free memory they allocate. This addresses <rdar://problem/6506035>.
Modified:
cfe/trunk/lib/Lex/Preprocessor.cpp
Modified: cfe/trunk/lib/Lex/Preprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Preprocessor.cpp?rev=62498&r1=62497&r2=62498&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/Preprocessor.cpp (original)
+++ cfe/trunk/lib/Lex/Preprocessor.cpp Mon Jan 19 01:45:44 2009
@@ -98,7 +98,9 @@
Macros.begin(), E = Macros.end(); I != E; ++I) {
// We don't need to free the MacroInfo objects directly. These
// will be released when the BumpPtrAllocator 'BP' object gets
- // destroyed.
+ // destroyed. We still need to run the dstor, however, to free
+ // memory alocated by MacroInfo.
+ I->second->~MacroInfo();
I->first->setHasMacroDefinition(false);
}
More information about the cfe-commits
mailing list