Commit e95c0a25 authored by Jason Fried's avatar Jason Fried Committed by Facebook Github Bot

memory leak fix

Summary:
release() returns ptr contained and thus we never actually call the destructor :|

.reset() is what we wanted, call the destructor NOW.

Reviewed By: yfeldblum

Differential Revision: D19548008

fbshipit-source-id: be904a7b5fb84aae5deef408e9d8e05fcd930a4c
parent 4e91e1ca
...@@ -36,10 +36,10 @@ cdef class AsyncioExecutor: ...@@ -36,10 +36,10 @@ cdef class AsyncioExecutor:
def __dealloc__(AsyncioExecutor self): def __dealloc__(AsyncioExecutor self):
# We drive it one last time # We drive it one last time
deref(self.cQ).drive() deref(self.cQ).drive()
# We are Explicitly releasing here, otherwise it is possible # We are Explicitly reset here, otherwise it is possible
# that self.cQ dstor runs after python finalize # that self.cQ dstor runs after python finalize
# Cython deletes these after __dealloc__ returns. # Cython deletes these after __dealloc__ returns.
self.cQ.release() self.cQ.reset()
cdef cAsyncioExecutor* get_executor(): cdef cAsyncioExecutor* get_executor():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment