#11521: Memleak when resolving the action of Integers on an Elliptic Curve
------------------------+---------------------------------------------------
Reporter: jpflori | Owner: robertwb
Type: defect | Status: needs_work
Priority: major | Milestone: sage-4.8
Component: coercion | Keywords: sd35
Work_issues: | Upstream: N/A
Reviewer: | Author: Simon King
Merged: | Dependencies: #11900 #715
------------------------+---------------------------------------------------
Comment(by SimonKing):
I think I should describe the problem in more detail.
Currently,
* There is a strong reference from `__main__` to the action and coercion
caches that are stored in the coercion model. That's fine.
* Parents store actions as well. Some of these parents (the integer ring,
for example) will always stay in memory.
* There is a strong reference from any action and homset back to domain
and codomain, which are used as keys in the cache. I think that's fine: If
a homset is alive then its domain and codomain must remain alive as well.
* The action and coercion caches have a strong reference to the values.
* There is no direct reference from domain and codomain to the homset.
Hence, if an action is stored in the action cache, then there will always
be a chain of strong references from `__main__` via the cache to the
action, and further to domain and codomain, so that it can not be
collected.
On the other hand, if weak references to the values of the action and
coercion caches are used, then an action or a coercion could die even when
domain and codomain were still alive. That's probably not good. To the
very least, it would imply that actions would be needed to be re-created
over and over again.
How could that be solved?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11521#comment:84>
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.