From 0f77b4ff1b49b654ced83339a8d6c4d1a163e0ff Mon Sep 17 00:00:00 2001 From: Axel Naumann Date: Tue, 1 Jul 2014 16:03:39 +0200 Subject: [PATCH] Less mem leaks. --- lib/UserInterface/UserInterface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/UserInterface/UserInterface.cpp b/lib/UserInterface/UserInterface.cpp index 3a4782b5..eba0e78a 100644 --- a/lib/UserInterface/UserInterface.cpp +++ b/lib/UserInterface/UserInterface.cpp @@ -109,8 +109,8 @@ namespace cling { } using namespace textinput; - StreamReader* R = StreamReader::Create(); - TerminalDisplay* D = TerminalDisplay::Create(); + llvm::OwningPtr R(StreamReader::Create()); + llvm::OwningPtr D(TerminalDisplay::Create()); TextInput TI(*R, *D, histfilePath.empty() ? 0 : histfilePath.c_str()); TI.SetPrompt("[cling]$ ");