#14711: Weak references in the coercion graph
-------------------------------------+-------------------------------------
Reporter: jpflori | Owner: davidloeffler
Type: defect | Status: needs_review
Priority: critical | Milestone: sage-6.2
Component: number fields | Resolution:
Keywords: memleak, number | Merged in:
field, QuadraticField | Reviewers: Nils Bruin, Jean-
Authors: Simon King, | Pierre Flori
Travis Scrimshaw, Jean-Pierre | Work issues:
Flori | Commit:
Report Upstream: N/A | ea58b22f0bf2652e7d04b3d55e6217dcb8732cdf
Branch: | Stopgaps:
public/ticket/14711 |
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by SimonKing):
Replying to [comment:226 nthiery]:
> Hmm, this is not super convincing since this adds some complexity: when
should one use _internal_coercion_map_from or coerce_map_from? when should
one do a copy?
If you can be sure that domain and codomain will remain strongly
referenced, then you should be safe with _internal_coercion_map_from---but
since the _repr_ method can not know whether a strong reference will
remain, it will print the warning.
If it could be that the map itself is the only object holding references
to domain and codomain, then you must copy it (or use coerce_map_from).
> As for the current workaround, I prefer using {{{copy}}} to introducing
another protocol as in comment:218.
I don't think the suggestion from comment:218 has a chance to work. Can
_repr_ take an optional argument?
--
Ticket URL: <http://trac.sagemath.org/ticket/14711#comment:227>
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.