We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3862a41 + 7b8d8d1 commit 1f4a24cCopy full SHA for 1f4a24c
src/napari_imagej/widgets/napari_imagej.py
@@ -138,7 +138,15 @@ def return_search_bar():
138
# Start constructing the ImageJ instance
139
self.ij_initializer.start()
140
141
+ # Ensure widget closes when JVM closes
142
+ # Without this call we are prone to segfaults during JVM shutdown
143
+ when_jvm_stops(self.close)
144
+
145
def close(self):
146
+ # Ensure setup completed
147
+ self.wait_for_finalization()
148
+ # Close things down
149
+ super().close()
150
self.ij_initializer._clean_subscribers()
151
152
def wait_for_finalization(self):
0 commit comments