Skip to content
Snippets Groups Projects
Commit 9ee7d456 authored by Ted Kremenek's avatar Ted Kremenek
Browse files

Run destructors of MacroInfo objects to free memory they allocate. This...

Run destructors of MacroInfo objects to free memory they allocate.  This addresses <rdar://problem/6506035>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62498 91177308-0d34-0410-b5e6-96231b3b80d8
parent 2fa3ec88
No related branches found
No related tags found
No related merge requests found
...@@ -98,7 +98,9 @@ Preprocessor::~Preprocessor() { ...@@ -98,7 +98,9 @@ Preprocessor::~Preprocessor() {
Macros.begin(), E = Macros.end(); I != E; ++I) { Macros.begin(), E = Macros.end(); I != E; ++I) {
// We don't need to free the MacroInfo objects directly. These // We don't need to free the MacroInfo objects directly. These
// will be released when the BumpPtrAllocator 'BP' object gets // 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); I->first->setHasMacroDefinition(false);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment