Changes between Version 92 and Version 134 of Ticket #13447


Ignore:
Timestamp:
01/13/19 19:22:41 (11 months ago)
Author:
SimonKing
Comment:

Even better news: With the last commit, multivariate polynomial rings can to some extent be garbage collected:

        sage: from sage.libs.singular.ring import total_ring_reference_count
        sage: n = total_ring_reference_count()
        sage: P.<x,y,z> = GF(19)[]
        sage: del P,x,y,z
        sage: import gc
        sage: _ = gc.collect()
        sage: n == total_ring_reference_count()
        True

Hence, the purpose of this ticket is fulfilled. I consider it therefore as "needs review".

Caveat: Arithmetic operations are still preventing a garbage collection. But that seems to be a totally different topic.

sage: P.<x,y,z> = GF(19)[]
sage: p = 2*x^3+x*y*z-z^2*x^2
sage: del P,x,y,z,p
sage: gc.collect()
21
sage: n == total_ring_reference_count()
False

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13447

    • Property Status changed from needs_work to needs_review
    • Property Authors changed from Nils Bruin, Simon King to Simon King
    • Property Cc burcin added
    • Property Commit changed from to 70c08b09315f9e897fb2dbc6ba748ed6cc681b06
    • Property Milestone changed from sage-5.11 to sage-6.4
    • Property Branch changed from to u/SimonKing/make_libsingular_multivariate_polynomial_rings_collectable
    • Property Report Upstream changed from None of the above - read trac for reasoning. to N/A
    • Property Reviewers changed from Simon King to
    • Property Work issues changed from Understand why sometimes `new_RingWrap` needs an incref and sometimes not to
  • Ticket #13447 – Description

    v92 v134  
    22
    33The present work-around is to permanently store references to these upon creation, thus preventing collection. It would be nice if we could properly solve the problem (or at least establish that the problem is specific to `bsd.math`)
    4 
    5 '''Apply''' [attachment:trac_13447-sanitise_ring_refcount.patch]