Skip to content

Commit

Permalink
Fix object deallocation
Browse files Browse the repository at this point in the history
  • Loading branch information
mwtian committed May 27, 2021
1 parent becbd05 commit 10ad72b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/ray/includes/object_ref.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ cdef class ObjectRef(BaseID):
worker.core_worker.add_object_ref_reference(self)
self.in_core_worker = True

def __del__(self):
def __dealloc__(self):
if self.in_core_worker:
try:
worker = ray.worker.global_worker
Expand Down Expand Up @@ -145,7 +145,7 @@ cdef class ClientObjectRef(ObjectRef):
client.ray.call_retain(id)
self.in_core_worker = False

def __del__(self):
def __dealloc__(self):
if client.ray.is_connected() and not self.data.IsNil():
client.ray.call_release(self.binary())

Expand Down

0 comments on commit 10ad72b

Please sign in to comment.