Skip to content

Commit 4b62f59

Browse files
committed
[metacling] Destroy and release llvm::ManagedStatics
1 parent 8a7d481 commit 4b62f59

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/metacling/src/TCling.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,10 @@ extern "C" R__DLLEXPORT TInterpreter *CreateInterpreter(void* interpLibHandle,
632632
extern "C" R__DLLEXPORT void DestroyInterpreter(TInterpreter *interp)
633633
{
634634
delete interp;
635+
// Destroy llvm::ManagedStatic variables. CppInterOp uses ManagedStatic to
636+
// maintain a stack of multiple interpreters.
637+
llvm::llvm_shutdown()
638+
635639
}
636640

637641
// Load library containing specified class. Returns 0 in case of error

0 commit comments

Comments
 (0)