#14711: Memleak when creating QuadraticField
-------------------------------------------------+-------------------------
       Reporter:  jpflori                        |        Owner:
           Type:  defect                         |  davidloeffler
       Priority:  critical                       |       Status:  new
      Component:  number fields                  |    Milestone:  sage-5.12
       Keywords:  memleak, number field,         |   Resolution:
  QuadraticField                                 |    Merged in:
        Authors:                                 |    Reviewers:
Report Upstream:  N/A                            |  Work issues:
         Branch:                                 |       Commit:
   Dependencies:                                 |     Stopgaps:
-------------------------------------------------+-------------------------

Comment (by SimonKing):

 Unfortunately, this easy change is not enough. I still get
 {{{
 sage: Q = QuadraticField(-3)
 sage: import gc
 sage: gc.collect()
 524
 sage: C = Q.__class__.__base__
 sage: len([x for x in gc.get_objects() if isinstance(x, C)])
 3
 sage: del Q
 sage: gc.collect()
 0
 sage: len([x for x in gc.get_objects() if isinstance(x, C)])
 3
 sage: Q = QuadraticField(-5)
 sage: len([x for x in gc.get_objects() if isinstance(x, C)])
 4
 sage: del Q
 sage: gc.collect()
 398
 sage: len([x for x in gc.get_objects() if isinstance(x, C)])
 4
 }}}

 But if I recall correctly, there is further strong caching done for number
 fields.

--
Ticket URL: <http://trac.sagemath.org/ticket/14711#comment:14>
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/groups/opt_out.

Reply via email to