Opened 3 years ago
Closed 3 years ago
#24745 closed defect (fixed)
leaking in the symbolic ring
Reported by:  vdelecroix  Owned by:  

Priority:  blocker  Milestone:  sage8.2 
Component:  memleak  Keywords:  
Cc:  rws  Merged in:  
Authors:  Ralf Stephan  Reviewers:  Jeroen Demeyer 
Report Upstream:  N/A  Work issues:  
Branch:  a42d589 (Commits, GitHub, GitLab)  Commit:  a42d5893a26bab529152311478a8c081e1612f49 
Dependencies:  #24668  Stopgaps: 
Description
The following operation creates a leak
pi * I * RR.one()
This can be tested with
import gc def num_complex(): gc.collect() return sum(1 for t in gc.get_objects() if type(t) is sage.rings.complex_number.ComplexNumber) for _ in range(10): print num_complex() for _ in range(10): a = pi * I * RR.one()
Original report on https://groups.google.com/forum/#!topic/sagedevel/pRXccDmXkIEsagedevel.
Change History (7)
comment:1 Changed 3 years ago by
comment:2 Changed 3 years ago by
 Branch set to u/rws/leaking_in_the_symbolic_ring
comment:3 Changed 3 years ago by
 Commit set to a42d5893a26bab529152311478a8c081e1612f49
 Status changed from new to needs_review
Note you need beta6 (or a copy of pynac0.7.16 in upstream/) to test this.
New commits:
f5b3de4  24668: version/chzksum

67f9ddc  24668: doctest fixes

2568492  24668: fix doctest

9b2e16c  Merge branch 't/24668/upgrade_to_pynac_0_7_16' into t/24745/leaking_in_the_symbolic_ring

a42d589  24745: pynac patch: fix memleaks in inplace PyObject numerics

comment:4 Changed 3 years ago by
 Dependencies set to #24668
comment:5 Changed 3 years ago by
 Reviewers set to Jeroen Demeyer
comment:6 Changed 3 years ago by
 Status changed from needs_review to positive_review
comment:7 Changed 3 years ago by
 Branch changed from u/rws/leaking_in_the_symbolic_ring to a42d5893a26bab529152311478a8c081e1612f49
 Resolution set to fixed
 Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
Thanks for the excellent diagnostics. I will commit a Pynac patch which depends on #24668 (0.7.16). There was a superfluous
Py_INCREF
in the inplace multiplication code.