#18905: fix more leaks found in #18897
---------------------------+------------------------
       Reporter:  dimpase  |        Owner:
           Type:  defect   |       Status:  new
       Priority:  major    |    Milestone:  sage-6.8
      Component:  memleak  |   Resolution:
       Keywords:           |    Merged in:
        Authors:           |    Reviewers:
Report Upstream:  N/A      |  Work issues:
         Branch:           |       Commit:
   Dependencies:  #18897   |     Stopgaps:
---------------------------+------------------------

Comment (by SimonKing):

 attachment:test2.png shows the result of
 {{{
 sage: K = GF(31)
 sage: A = K.algebraic_closure()
 sage: del A,K
 sage: L = [c for c in gc.get_objects() if isinstance(c,
 sage.rings.finite_rings.integer_mod.NativeIntStruct) and
 len(c._get_table())==31]
 sage: filter = lambda x: (x is not L) and (not isinstance(x,
 sage.rings.finite_rings.integer_mod.IntegerMod_int))
 sage:
 
objgraph.show_backrefs(L[0],filter=filter,filename="/home/king/Sage/work/memleak/test2.png")
 Graph written to /tmp/objgraph-4qP1R3.dot (16 nodes)
 Image generated as /home/king/Sage/work/memleak/test2.png
 }}}

 The picture somehow looks familiar: There is a coerce map involved, namely
 !Int_to_IntegerMod. Coerce maps are supposed to have a weak reference to
 the domain and a strong reference to the codomain. Since the domain of
 !Int_to_IntegerMod presumably is the ring of integers and can't be
 deallocated anyway, a strong reference to the codomain means trouble...

--
Ticket URL: <http://trac.sagemath.org/ticket/18905#comment:12>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to