[ https://issues.apache.org/jira/browse/PROTON-1691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16268032#comment-16268032 ]
Xin Chen commented on PROTON-1691: ---------------------------------- It is not an issue if I call link.free() after close. > Memory leak when creating endpoint objects with a handler > --------------------------------------------------------- > > Key: PROTON-1691 > URL: https://issues.apache.org/jira/browse/PROTON-1691 > Project: Qpid Proton > Issue Type: Bug > Components: proton-c > Affects Versions: proton-c-0.18.1 > Environment: Reproduced on Windows but the code is not platform > specific. > Reporter: Xin Chen > Assignee: Cliff Jansen > > Using the Python binding, one can provide a handler when creating an Endpoint > object (Connection/Session/Link). This handler object is set in the record > context. In pn_###_finalize methods, the context is not cleared by calling > pn_record_clear. This results in a _cadapter object leaking in Python process > without any references. The fix is simply to call pn_record_clear before > freeing the context. For example, in pn_link_finalize (line 1121 in engine.c), > + pn_record_clear(link->context); > pn_free(link->context); > With this fix the memory does not grow anymore with repeated link > creation/closing. I only use a handler in link endpoint but I think this is > needed for connection and session as well. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org