From 970b2fb56c532a2c251af02364c682158bfff7cc Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Tue, 22 Jan 2013 17:29:05 -0800 Subject: [PATCH] Kiling a memory leak... I hate C interfaces --- cpp/ycm/ClangCompleter/CompilationDatabase.cpp | 1 + python/completers/cpp/clang_completer.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/ycm/ClangCompleter/CompilationDatabase.cpp b/cpp/ycm/ClangCompleter/CompilationDatabase.cpp index 0e4c4a08..394b0631 100644 --- a/cpp/ycm/ClangCompleter/CompilationDatabase.cpp +++ b/cpp/ycm/ClangCompleter/CompilationDatabase.cpp @@ -106,6 +106,7 @@ std::string CompilationDatabase::CompileCommandWorkingDirectoryForFile( path_to_directory = CXStringToString( clang_CompileCommand_getDirectory( command ) ); + clang_CompileCommands_dispose( commands ); return path_to_directory; } diff --git a/python/completers/cpp/clang_completer.py b/python/completers/cpp/clang_completer.py index f4855284..9cf6e9dd 100644 --- a/python/completers/cpp/clang_completer.py +++ b/python/completers/cpp/clang_completer.py @@ -82,7 +82,7 @@ class ClangCompleter( Completer ): self.future = None return - # TODO: sanitize query + # TODO: sanitize query, probably in C++ code files = ycm_core.UnsavedFileVec() if not query: