#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:            
Work_issues:            |       Upstream:  N/A       
   Reviewer:            |         Author:            
     Merged:            |   Dependencies:            
------------------------+---------------------------------------------------

Comment(by SimonKing):

 On the other hand, it could be that using weak keys in the homset cache
 will not work: The keys are triples: domain, codomain and category.

 What we want is: If either the domain or the codomain or the category have
 no strong reference, then the homset can be garbage collected.

 Hence: Why don't we use a dictionary of dictionaries of dictionaries?

 What I mean is:

  * The keys of sage.categories.homset._cache should be weak references to
 the domain
  * The values of sage.categories.homset._cache should be dictionaries
 whose keys are weak references to the codomain.
  * The keys of these dictionaries should be weak references to the
 category, and the value a weak reference to the homset.

 Hence, if there is no strong reference to either domain or codomain or
 category, then the homset can be deallocated.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11521#comment:24>
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.

Reply via email to