Skip to content
Commit d18e668f authored by Torok Edwin's avatar Torok Edwin
Browse files

Free the constants that have no uses in ~LLVMContext.

This fixes leaks from LLVMContext in multithreaded apps.
Since constants are only deleted if they have no uses, it is safe to not delete
a Module on shutdown, as many single-threaded tools do.
Multithreaded apps should however delete the Module before destroying the
Context to ensure that there are no leaks (assuming they use a different context
for each thread).

llvm-svn: 80590
parent 487d5760
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment