#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):
{{{
sage:
objgraph.show_chain(objgraph.find_backref_chain(random.choice(objgraph.by_type('NumberField_quadratic_with_category')),inspect.ismodule),
filename='chain.png')
}}}
shows me the file chain.png in the attachment (of course, subject to some
random choice).
What is happening there? If I am not mistaken, objgraph only shows strong
references. The quadratic field Q is used as key for the `MonoDict` which
stores conversions into `CDF`. This monodict has a weak reference to the
key Q, but a strong reference to the value, which is a morphism. The
morphism of course points to both domain and codomain, and there is your
problem.
So, how can we break this chain?
--
Ticket URL: <http://trac.sagemath.org/ticket/14711#comment:23>
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.