Skip to content

Commit 18fc33e

Browse files
committed
Add llvmlite cleanup
1 parent 4b294ca commit 18fc33e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/pyoptinterface/_src/jit_llvm.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from llvmlite import ir, binding
2+
import atexit
23

34
from typing import List
45

@@ -7,6 +8,9 @@
78
binding.initialize_native_target()
89
binding.initialize_native_asmprinter()
910

11+
# Register shutdown function to clean up LLVM resources
12+
atexit.register(binding.shutdown)
13+
1014

1115
class LLJITCompiler:
1216
def __init__(self):

0 commit comments

Comments
 (0)