You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2014/10/10 14:55:46 UTC

svn commit: r1630844 - /qpid/proton/branches/examples/proton-c/bindings/python/proton.py

Author: gsim
Date: Fri Oct 10 12:55:46 2014
New Revision: 1630844

URL: http://svn.apache.org/r1630844
Log:
PROTON-687: clear reference to C object when delivery is released.

Modified:
    qpid/proton/branches/examples/proton-c/bindings/python/proton.py

Modified: qpid/proton/branches/examples/proton-c/bindings/python/proton.py
URL: http://svn.apache.org/viewvc/qpid/proton/branches/examples/proton-c/bindings/python/proton.py?rev=1630844&r1=1630843&r2=1630844&view=diff
==============================================================================
--- qpid/proton/branches/examples/proton-c/bindings/python/proton.py (original)
+++ qpid/proton/branches/examples/proton-c/bindings/python/proton.py Fri Oct 10 12:55:46 2014
@@ -2898,12 +2898,14 @@ class Delivery(object):
     self.link._deliveries.add(self)
 
   def __del__(self):
-    pn_delivery_set_context(self._dlv, pn_py2void(None))
+    self._release()
 
   def _release(self):
     """Release the underlying C Engine resource."""
     if self._dlv:
+      pn_delivery_set_context(self._dlv, pn_py2void(None))
       pn_delivery_settle(self._dlv)
+      self._dlv = None
 
   @property
   def tag(self):



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org