#12313: Fix yet another memory leak caused by caching of coercion data
--------------------------------------------+-------------------------------
       Reporter:  SimonKing                 |         Owner:  rlm         
           Type:  defect                    |        Status:  needs_review
       Priority:  major                     |     Milestone:  sage-5.0    
      Component:  memleak                   |    Resolution:              
       Keywords:  coercion weak dictionary  |   Work issues:              
Report Upstream:  N/A                       |     Reviewers:              
        Authors:  Simon King                |     Merged in:              
   Dependencies:  #715, #11599              |      Stopgaps:              
--------------------------------------------+-------------------------------
Changes (by jpflori):

  * dependencies:  #715 => #715, #11599


Comment:

 Here comes a first draft of the patch.

 It adds a cdef'ed cparent attribute and makes sure it is set to the right
 value everywhere it should.

 Or at least everywhere needed to pass "make ptest" on my computer (once
 the ticket is rebased on top of 11599).

 Some point to clarify :

  1. PY_NEW could be replaced by .!__new!__  (possible from Cython >= 0.12)
  1. I put (<Polynomial_template>self)._cparent when access to _cparent is
 needed somehow inspired by how (<Polynomial_template>self)._parent was
 accessed, but I feel that just self._cparent without casting is enough,
 isn't it ? If it is the code would be more readable (and scripting the
 change is trivial.)

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