#16220: Waste of time in iterator_edges 3
-------------------------------------+-------------------------------------
Reporter: vdelecroix | Owner: vdelecroix
Type: enhancement | Status: new
Priority: major | Milestone: sage-6.2
Component: graph theory | Resolution:
Keywords: graphs, | Merged in:
datastructure | Reviewers:
Authors: Vincent Delecroix | Work issues:
Report Upstream: N/A | Commit:
Branch: public/16220 | 98286f45fc077f9778708ca3f064a2f5a13853ad
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by vdelecroix):
Replying to [comment:2 ncohen]:
> Isn't there a problem if you want to iterate over the edges but stop
midway ? Isn't it the case that the array is never deallocated ?
You are right, with a code like
{{{
sage: it = build_me_an_edge_iterator()
sage: it.next()
sage: del it
}}}
we keep an array never deallocated. But what happens for alloc/dealloc
inside cdef functions?
A solution would be to implement an iterator in Cython with direct access
to the `SparseGraph` (doing all proper deallocation in `__dealloc__`). Is
it worth it?
--
Ticket URL: <http://trac.sagemath.org/ticket/16220#comment:3>
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.