[LLVMdev] Cleaning up Module, ExecutionEngine, etc

Paul J. Lucas paul at lucasmail.org
Tue Oct 16 14:38:55 PDT 2012


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.





More information about the llvm-dev mailing list