diff options
author | Jim Grosbach <grosbach@apple.com> | 2011-10-18 19:57:38 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2011-10-18 19:57:38 +0000 |
commit | 05c562f0942721e7efaf7321dda2df80e31965c7 (patch) | |
tree | 56ecc6c7de6e5ad8ca28aad11eb6db0fcd88993a | |
parent | 2f31b33f34f569d180ab5848d0c5581c9e1f74ee (diff) | |
download | bcm5719-llvm-05c562f0942721e7efaf7321dda2df80e31965c7.tar.gz bcm5719-llvm-05c562f0942721e7efaf7321dda2df80e31965c7.zip |
The MCJITMemoryManager takes ownership of the JMM, so don't leak it.
llvm-svn: 142410
-rw-r--r-- | llvm/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h b/llvm/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h index 40bc031a077..c17a39736cc 100644 --- a/llvm/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h +++ b/llvm/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h @@ -27,6 +27,8 @@ class MCJITMemoryManager : public RTDyldMemoryManager { Module *M; public: MCJITMemoryManager(JITMemoryManager *jmm, Module *m) : JMM(jmm), M(m) {} + // We own the JMM, so make sure to delete it. + ~MCJITMemoryManager() { delete JMM; } // Allocate ActualSize bytes, or more, for the named function. Return // a pointer to the allocated memory and update Size to reflect how much |