#13566: Simplicial complex examples as singletons
---------------------------------------------------+------------------------
Reporter: tscrim | Owner: tscrim
Type: enhancement | Status: needs_work
Priority: minor | Milestone: sage-5.6
Component: algebraic topology | Resolution:
Keywords: simplicial | Work issues:
Report Upstream: N/A | Reviewers: Travis
Scrimshaw
Authors: Christian Nassau, John Palmieri | Merged in:
Dependencies: #13244, #12587 | Stopgaps:
---------------------------------------------------+------------------------
Changes (by nbruin):
* status: positive_review => needs_work
Comment:
Why is this caching desirable? As far as I can see, this creates a memory
leak:
{{{
i=1
while true:
sage.homology.examples.SimplicialComplexExamples.Sphere(i)
i=i+1
}}}
fails much sooner than it should because all the now useless previous
examples are still nailed in memory.
You aren't proposing the cache to save computation time, I suppose? It's
probably because you find it desirable to guarantee uniqueness when these
things exist (are they parents?) In that case, you can get what you want
by inheriting from !UniqueRepresentation or !UniqueFactory. That keeps a
weak cache, so that
examples that aren't otherwise referenced anymore can be collected.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13566#comment:17>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.