Author: Matti Picus <[email protected]>
Branch: issue2444
Changeset: r89236:b9a117c04b7c
Date: 2016-12-26 19:51 +0200
http://bitbucket.org/pypy/pypy/changeset/b9a117c04b7c/

Log:    remove cyclic reference, w_obj <-> pymemobj, view = pymemobj.c_view

diff --git a/pypy/module/cpyext/memoryobject.py 
b/pypy/module/cpyext/memoryobject.py
--- a/pypy/module/cpyext/memoryobject.py
+++ b/pypy/module/cpyext/memoryobject.py
@@ -97,7 +97,7 @@
     fill_Py_buffer(space, w_obj.buf, view)
     try:
         view.c_buf = rffi.cast(rffi.VOIDP, w_obj.buf.get_raw_address())
-        view.c_obj = make_ref(space, w_obj)
+        #view.c_obj = make_ref(space, w_obj) # NO - this creates a ref cycle!
         rffi.setintfield(view, 'c_readonly', w_obj.buf.readonly)
         isstr = False
     except ValueError:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to