Skip to content

Commit 09e98c7

Browse files
committed
decref on zmq_msg needs to be in dealloc
del doesn't run
1 parent 91b3767 commit 09e98c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

zmq/backend/cython/_zmq.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -365,10 +365,10 @@ def __init__(
365365
_check_rc(rc)
366366
self._failed_init = False
367367

368-
def __del__(self):
368+
def __dealloc__(self):
369369
if self._failed_init:
370370
return
371-
# This simply decreases the 0MQ ref-count of zmq_msg.
371+
# decrease the 0MQ ref-count of zmq_msg
372372
with nogil:
373373
rc: C.int = zmq_msg_close(address(self.zmq_msg))
374374
_check_rc(rc)

0 commit comments

Comments
 (0)