#12215: Memleak in UniqueRepresentation, @cached_method
---------------------------------------------+------------------------------
Reporter: vbraun | Owner: rlm
Type: defect | Status: needs_work
Priority: major | Milestone: sage-4.8
Component: memleak | Keywords:
UniqueRepresentation cached_method caching
Work_issues: segfaults for elliptic curves | Upstream: N/A
Reviewer: | Author: Simon King
Merged: | Dependencies: #11115 #11900
---------------------------------------------+------------------------------
Comment(by SimonKing):
Replying to [comment:33 vbraun]:
> In Python one must not use __dealloc__() to free C resources, at least
not unless you are absolutely certain that the Python object does not
participate in circular references.
Do you mean `__del__`? If I remember correctly, `__dealloc__` is Cython,
has nothing to do with the ability of the garbage collector to deal with
circular references, and it is what one ''must'' have if there are
C-resources to free after deleting all Python stuff. So, from all what I
know, using `__dealloc__` (not `__del__`!) is a clean solution.
> Does it help to do an explicit `gc.collect()` at the end of `quit_sage`
and only then deallocate Pari? If not we might have to give up clearing
the Pari stack...
I didn't try.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12215#comment:34>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.