From 221929310b192abc79140318fb9801760e76a928 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 14 Mar 2008 06:07:05 +0000 Subject: Make the preprocessor own its PPCallbacks, fixing a memory leak. Patch by Sam Bishop! llvm-svn: 48357 --- clang/Lex/Preprocessor.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/Lex/Preprocessor.cpp') diff --git a/clang/Lex/Preprocessor.cpp b/clang/Lex/Preprocessor.cpp index 79b0d62edbe..86156a07728 100644 --- a/clang/Lex/Preprocessor.cpp +++ b/clang/Lex/Preprocessor.cpp @@ -109,6 +109,8 @@ Preprocessor::~Preprocessor() { // Delete the scratch buffer info. delete ScratchBuf; + + delete Callbacks; } /// Diag - Forwarding function for diagnostics. This emits a diagnostic at -- cgit v1.2.3