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

Comment (by SimonKing):

 Replying to [comment:110 SimonKing]:
 > And I just notice that the documentation of the module
 `sage.structure.parent` starts with a "simple example of registering
 coercions", which I find rather obscure and which does things in a way
 that we would do differently today. E.g., it does not initialise the
 category, but overrides the method `category()`. And it calls
 `self._populate_coercion_lists_()`, which I have never seen in code
 created in the past few years.
 >
 > Hence, I'll update this example.

 Hm. I am undecided.

 Perhaps it would be better to focus here on fixing the memory leak (which,
 I think succeeded), only documenting with examples that it has worked.

 Hence, on ''this'' ticket, I would just
 - provide missing docs for `SchemeMorphism`
 - Let the string representation of a weakened map consist of a warning to
 not use this map outside of the coercion framework.
 - Perhaps: Re-introduce a cdef public attribute _codomain, since this
 would allow faster access than calling .codomain(), and since the codomain
 will be strongly referenced anyway.

 Everything else should perhaps better be done on a follow-up ticket:
 - Add documentation explaining the current weak coercion model, to
 facilitate maintanance,
 - Add `permanent=True` option to `register_coercion()`.

 What do you think?

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