Paul Giannaros created ZOOKEEPER-1470:
-----------------------------------------

             Summary: zkpython: close() should delete any watcher
                 Key: ZOOKEEPER-1470
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1470
             Project: ZooKeeper
          Issue Type: Bug
          Components: contrib-bindings
    Affects Versions: 3.4.3
            Reporter: Paul Giannaros
            Priority: Minor


When calling zookeeper.close(handle), any connection watcher for the handle is 
not deleted. This is a source of memory leaks for applications that create and 
close lots of connections. Its damage can be mitigated to some degree by 
changing the watcher to some function that won't keep references to instances 
alive before calling close.

The fix is just to add a free_pywatcher(..) call in the close sequence. 
Alternatively you could allow set_watcher(handle, None) as a way of deleting 
the watcher, but it's probably best to take care of it on close too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to