Skip to content

Commit

Permalink
Merge pull request #741 from henrypinkard/new_bridge_fix
Browse files Browse the repository at this point in the history
Fix error on script end
  • Loading branch information
henrypinkard authored Apr 1, 2024
2 parents fe4209a + 99345d7 commit 6f03251
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pycromanager/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version_info = (0, 29, 9)
version_info = (0, 29, 10)
__version__ = ".".join(map(str, version_info))
4 changes: 2 additions & 2 deletions pycromanager/zmq_bridge/bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,11 +553,11 @@ def __init__(self, serialized_object, bridge: _Bridge):
# # In case there's an exception rather than normal garbage collection,
# # this makes sure cleanup occurs properly
# # Need to use a wr to ensure that reference to close doesnt cause memeory leak
wr = weakref.ref(self._close)
wr = weakref.ref(self)
def cleanup():
if wr() is not None:
# It hasn't already been garbage collected
wr()()
wr()._close()
atexit.register(cleanup)
self._close_lock = Lock()

Expand Down

0 comments on commit 6f03251

Please sign in to comment.