diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-05-20 00:43:19 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-05-20 00:43:19 +0000 |
commit | 27f8a28bee33bb0e857cfe1a61c281bbc234b338 (patch) | |
tree | 5e0cc27d9b0948a8cd6bc99306411a03d35d49fe /lib/AST/DeclSerialization.cpp | |
parent | 017cbdfd5417d4d31ae6406421276f90269f75e2 (diff) |
Try to plug some memory leaks...
1) Sema::ParseAST now constructs a TranslationUnit object to own the top-level Decls, which releases the top-level Decls upon exiting ParseAST.
2) Bug fix: TranslationUnit::~TranslationUnit handles the case where a Decl is added more than once as a top-level Decl.
3) Decl::Destroy is now a virtual method, obviating the need for a special dispatch based on DeclKind.
3) FunctionDecl::Destroy now releases its Body using its Destroy method.
4) Added Stmt::Destroy and Stmt::DestroyChildren, which recursively delete the child ASTs of a Stmt and call their dstors. We may need to special case dstor/Destroy methods for particular Stmt subclasses that own other dynamically allocated objects besides AST nodes.
5) REGRESSION: We temporarily are not deallocating attributes; a FIXME is provided.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51286 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclSerialization.cpp')
0 files changed, 0 insertions, 0 deletions