Boost logo

Boost :

From: Jan van der Veen (j.van-der-veen_at_[hidden])
Date: 2001-07-24 09:02:40


Hi,

My application which is based on BGL leaks memory. So does the following sample
program.

#include <boost/graph/adjacency_list.hpp>

using namespace std;
using namespace boost;

int main(int, char**)
{
    typedef adjacency_list<listS, listS, undirectedS,
        property<vertex_name_t, set<int> > > TGraph;

    TGraph G(1024);
    
    for (int i = 0; i < 100; ++i) {
        G.clear();
        G = TGraph(1024 + i);
    }
}

The problem goes away when I change
    typedef adjacency_list<listS, listS, undirectedS,
        property<vertex_name_t, set<int> > > TGraph;
to
    typedef adjacency_list<listS, listS, undirectedS,
        property<vertex_name_t, int > > TGraph;
so it seems to be related to containers as property types.

I am using g++-3.0 on a redhat linux 6.2 pc.

Thanks for any help,

Jan van der Veen.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk