Boost logo

Boost Users :

From: Douglas Gregor (doug.gregor_at_[hidden])
Date: 2006-12-20 14:15:22


On Dec 6, 2006, at 10:12 AM, Hugo Ferreira wrote:
> It seems I'm having a memory leak after calling
> dijkstra_shortest_paths several times. Either I'm wrong, or the
> predecessor_map is not being deleted. The call I have is something
> like this:
>
> p = self.graph.vertex_property_map('vertex')
> boost.dijkstra_shortest_paths(self.graph, self.vertexes[src],
> predecessor_map = p, weight_map = self.weights)
>
> Then I manipulate p to get the shortest_path between two points, and
> exit the function. Still, even after a gc.collect(), the memory keeps
> getting bigger (and because my graph has about 1 million vertexes, it
> gets REALLY bigger).
>
> Any thoughts on how to force the memory allocation for the
> predecessor_map?

This is a bug in the BGL-Python bindings, where the graph type holds
on to a copy of all of its property map. I believe that I have now
fixed the problem in Subversion.

   Cheers,
   Doug


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