#15424: A coercion-related memory leak
-----------------------------+-------------------------
Reporter: SimonKing | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-5.13
Component: memleak | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
-----------------------------+-------------------------
Comment (by SimonKing):
Ouch. I thought that in our coercion model, maps and actions are cached on
the level of parents. Now I see that they ''additionally'' are cached in
the coercion model!
Apparently this additional cache is not always used. For example, it is
not used if you just do `K.coerce_map_from(ZZ)`. But it seems that a
coercion map ''is'' stored in the additional cache if you do a
multiplication.
And then you have a strongly referenced `TripleDict`, a key `(ZZ,K,None)`
and a morphism `phi:ZZ->K` as value. Even with #14711, `phi` would
strongly reference `K`. `ZZ` is immortal. Hence, the callback for the item
`(ZZ,K,None):phi` will never be called.
What shall we do about it? Isn't it the case that we are only storing maps
that already are cached on the level of parents? Then it would be safe to
just store a ''weak'' reference to this map, and the problem was solved.
--
Ticket URL: <http://trac.sagemath.org/ticket/15424#comment:8>
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.