]> granicus.if.org Git - clang/commit
Really fix: <rdar://problem/8361834> MacroInfo::AddTokenToBody() leaks memory
authorTed Kremenek <kremenek@apple.com>
Tue, 19 Oct 2010 21:30:15 +0000 (21:30 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 19 Oct 2010 21:30:15 +0000 (21:30 +0000)
commitea35f7775fc83bc7d2756192e639cadc682adc16
treec4cb6b583c32f8672885fabcf966e0f507864498
parent2a6b03af69cb25b15fc9488ff593e427d3214217
Really fix: <rdar://problem/8361834> MacroInfo::AddTokenToBody() leaks memory

The problem was not the management of MacroInfo objects, but that when we recycle them
via the MICache the memory of the underlying SmallVector (within MacroInfo) was not getting
released.  This is because objects stashed into MICache simply are reused with a placement
new, and never have their destructor called.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116862 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Lex/PPDirectives.cpp