#12313: Fix yet another memory leak caused by caching of coercion data
--------------------------------------------------+-------------------------
       Reporter:  SimonKing                       |         Owner:              
                                
           Type:  defect                          |        Status:  needs_work  
                                
       Priority:  major                           |     Milestone:  sage-5.3    
                                
      Component:  memleak                         |    Resolution:              
                                
       Keywords:  coercion weak dictionary        |   Work issues:  Rebase, and 
take into account Nils' comments
Report Upstream:  N/A                             |     Reviewers:  Simon King, 
Jean-Pierre Flori, John Perry   
        Authors:  Simon King, Jean-Pierre Flori   |     Merged in:              
                                
   Dependencies:  #11521, #11599, #12969, #12215  |      Stopgaps:              
                                
--------------------------------------------------+-------------------------

Comment (by SimonKing):

 Replying to [comment:188 nbruin]:
 > Replying to [comment:183 SimonKing]:
 > > Why? References to `TripleDictEraser` come from the `TripleDict` it
 points to, and from the weak references that are stored in said
 `TripleDict`. Would this be more than having a reference cycle that only
 involves `KeyedRef`, `TripleDict` and `TripleDictEraser`? None of them has
 a `__del__` method, isn't it?
 >
 > Hm ... For MonoDictEraser you used a weakref. That's mainly what led me
 to believe it's better.

 Yes, while working at rebasing my patch, I just noticed.

 Not sure. Since I already have updated my patch at #715 without weak
 reference (for `TripleDict`), I keep it like this ''there''. But now I am
 rebasing my patch from here, and I think I will change it into a weak
 reference ''here'' (in both cases).

 > > Hence, if you have a working iterator at #13387 then we should use
 that. Note that [attachment:idkey_dict] has a different iterator, thanks
 to Cython now supporting "yield". Do you think that iterator is safe?
 >
 > Apart from the fact that it's returning garbage keys at the moment:
 absolutely!

 Yesyes, there are no garbage keys with my new patch at #715.

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