Dealloc the memory of the removed decl.

This commit is contained in:
Vassil Vassilev 2013-10-28 21:33:04 -05:00 committed by sftnight
parent a08152d576
commit c33a583d16

View File

@ -262,7 +262,9 @@ namespace cling {
}
bool Successful = DeclContextExt::removeIfLast(DC, D);
// With the bump allocator this is nop.
if (Successful)
m_Sema->getASTContext().Deallocate(D);
// ExistsInDC && Successful
// true false -> false // In the context but cannot delete
// false false -> true // Not in the context cannot delete