From e72101f5c7bd5e8077de620d223c5a255b8f705d Mon Sep 17 00:00:00 2001 From: Quentin Bourgerie Date: Tue, 1 Mar 2022 15:38:20 +0100 Subject: [PATCH] fix(compiler): Delete target machine when no more in use (prevent leak in compilation) --- compiler/lib/Support/LLVMEmitFile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/lib/Support/LLVMEmitFile.cpp b/compiler/lib/Support/LLVMEmitFile.cpp index 56f42e61b..5c8d53a61 100644 --- a/compiler/lib/Support/LLVMEmitFile.cpp +++ b/compiler/lib/Support/LLVMEmitFile.cpp @@ -65,7 +65,7 @@ llvm::Error emitObject(llvm::Module &module, string objectPath) { objectFile->os().flush(); objectFile->os().close(); objectFile->keep(); - + delete targetMachine; return llvm::Error::success(); }