The ExecutionEngine takes ownership of the Module and would (theoretically)
delete it in its destructor.
I'm not aware of a reason that the ExecutionEngine shouldn't be deleted.
-Andy
-----Original Message-----
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On
Behalf Of Paul J. Lucas
Sent: Tuesday, October 16, 2012 2:39 PM
To: llvmdev at cs.uiuc.edu List
Subject: [LLVMdev] Cleaning up Module, ExecutionEngine, etc
The LLVM tutorial creates an instance of Module and ExecutionEngine, yet
apparently never deletes these objects. Shouldn't it? Via something like:
delete TheModule;
at the end of main()?
- Paul
P.S.: Yes, I realize that the program will terminate and all memory for the
process will be reclaimed anyway. I'm talking about for a case where a more
complicated program creates more than one Module, ExecutionEngine, etc.
_______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev