Boost logo

Boost Users :

Subject: [Boost-users] [BGL] Free graph - double free or corruption
From: Matthieu BOUSSARD (mboussar_at_[hidden])
Date: 2010-01-03 20:23:59


Hello,

I'm using BGL to construct an exploration graph. At each decision step I
have to create a new graph. It seems that I'm not freeing correctly the
memory, causing a memory leak. The name of a node in the graph is a
pointer to a structure,

typedef adjacency_list <listS,vecS, directedS,
                                  property<vertex_name_t, state_t *,
property<vertex_prop_t,s_prop> >,
                                  property<edge_weight_t, float,
property<edge_name_t,int> >
>Graph;

I also use a map to find the vertex according to a given state
typedef std::tr1::unordered_map<state_t *, vertex_t> state_vertex_map_t;

In the destructor of my planner object, every time I try to free
anything (from the map or from the vertices of the graph) I'v got an
"double free or corruption" error. Could you help me to find the way to
free all the memory ? Thank you.

Best regards

Matthieu


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