#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:  u/SimonKing/ticket/14711       |       Commit:
   Dependencies:                                 |     Stopgaps:
-------------------------------------------------+-------------------------

Comment (by SimonKing):

 Replying to [comment:57 SimonKing]:
 > I just found something crazy: Apparently the rational field got garbage
 collected in one of the crashing examples. Hard to believe.

 Fortunately I was mistaken: It is only the case that the `__init__` method
 is called repeatedly on the same object `QQ` if you call `RationalField()`
 repeatedly. Namely, it is not using a classcall metaclass, but does the
 caching in `__new__`---but `__init__` is always called after `__new__`,
 whether it is cached or not. That's one of the reasons for introducing
 classcall metaclass.

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