Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL] delete children subgraphs
From: Andrew Sutton (andrew.n.sutton_at_[hidden])
Date: 2009-09-09 08:06:14


> I have a root subgraph from which I create a lot of children subgraphs,
> that use too much memory. How can I delete the children subgraphs after
> using them?
>

There isn't an easy method for erasing subgraphs. However, the subgraph
template does declare its list of children (m_children) to be public, so if
you have an iterator to the subgraph you want to delete, you can just do
sg.m_children.erase(i). Note that children_iterator isn't the same as the
iterator type of m_children. I think you can translate to it using
children_iterator::base().

Andrew Sutton
andrew.n.sutton_at_[hidden]



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net