#14058: Weakly reference binary operation codomains
-------------------------------------+-------------------------------------
       Reporter:  robertwb           |        Owner:  rlm
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.4
      Component:  memleak            |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Robert Bradshaw,   |    Reviewers:  Simon King, Frédéric
  Nils Bruin                         |  Chapoton, Jean-Pierre Flori
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  public/ticket/14058                |  13cb2a78983efb8f4edb00d6d10f8fc7da62e80d
   Dependencies:  #12313             |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by slabbe):

 In other doctests in the same file, `GF(3)`, `GF(7)` and `GF(41)` are also
 created. While there are references to `GF(7)` and `GF(41)`, no variable
 references to `GF(3)` which is available for gargage collection. If
 `GF(3)` gets garbage collected before the offending doctest, then
 everything is fine, the doctest pass. But it can also be garbage collected
 in the call to `gc.collect()` in the doctest. If this is the case, then
 `N0` was also counting `GF(3)` which explains why `N2-N0` can be negative.

 One way to fix this is to call `gc.collect()` before creating `N0`.

 (my first fix was using sets of ids... sorry for the noise).

--
Ticket URL: <http://trac.sagemath.org/ticket/14058#comment:68>
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/d/optout.

Reply via email to