Dima Pasechnik
2018-12-03 15:28:59 UTC
An expert in Cython/Python classes needed: __destruct__ is not called for a
reason I don't understand.
There is class Graph with a method convexity_properties
which calls cdef'd class ConvexityProperties in a separate pyx file.
A destructor for the latter is defined as
def __destruct__ but is never called. What is going on? What is the correct
design here?
Dima
---------- Forwarded message ---------
From: sage-trac <***@sagemath.org>
Date: Mon, 3 Dec 2018 15:02
Subject: Re: [sage-trac] #26795: Some memory leaks
To:
#26795: Some memory leaks
-------------------------------------+-------------------------------------
Reporter: jmantysalo | Owner:
Type: defect | Status: needs_work
Priority: major | Milestone: sage-8.5
Component: memleak | Resolution:
Keywords: | Merged in:
Authors: Dima Pasechnik | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
public/packages/glpkbackendmemleak |
c42c3bc27da534544dc62a953d5457d6c27532b5
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
`print()` there.
--
Ticket URL: <https://trac.sagemath.org/ticket/26795#comment:26>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple,
Mathematica, and MATLAB
reason I don't understand.
There is class Graph with a method convexity_properties
which calls cdef'd class ConvexityProperties in a separate pyx file.
A destructor for the latter is defined as
def __destruct__ but is never called. What is going on? What is the correct
design here?
Dima
---------- Forwarded message ---------
From: sage-trac <***@sagemath.org>
Date: Mon, 3 Dec 2018 15:02
Subject: Re: [sage-trac] #26795: Some memory leaks
To:
#26795: Some memory leaks
-------------------------------------+-------------------------------------
Reporter: jmantysalo | Owner:
Type: defect | Status: needs_work
Priority: major | Milestone: sage-8.5
Component: memleak | Resolution:
Keywords: | Merged in:
Authors: Dima Pasechnik | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
public/packages/glpkbackendmemleak |
c42c3bc27da534544dc62a953d5457d6c27532b5
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
{{{
import gc
i = 0
GG = graphs()
_ = next(GG); _ = next(GG);
if i > 20000: break
_ = gc.collect()
print get_memory_usage(), P.order()
i += 1
_ = P.convexity_properties()
}}}
??? There is an explicit `__destruct__` in class `ConvexityProperties`.
however, `__destruct__` is not called, as one can see by putting aimport gc
i = 0
GG = graphs()
_ = next(GG); _ = next(GG);
if i > 20000: break
_ = gc.collect()
print get_memory_usage(), P.order()
i += 1
_ = P.convexity_properties()
}}}
??? There is an explicit `__destruct__` in class `ConvexityProperties`.
`print()` there.
--
Ticket URL: <https://trac.sagemath.org/ticket/26795#comment:26>
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-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+***@googlegroups.com.
To post to this group, send email to sage-***@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+***@googlegroups.com.
To post to this group, send email to sage-***@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.