Boost logo

Boost Users :

From: Stefan Strasser (sstrasser_at_[hidden])
Date: 2005-04-23 15:51:26


(moving this to boost developer list)

FBSL schrieb:
> Hello
>
> I am having trouble to garbage-collect adjacency_list<>. I have
> instanciated it with correctly garbage-collected vectors and lists (I
> have copied vecS and listS definitions, and added Boehm GC's default
> allocator so that they are garbage-collected). In my application I need
> to dynamically allocate many graphs, but it does not work, there is a
> (big) memory leak. Unfortunately, there is no template argument in
> adjacency_list<> to specify Boehm GC's allocator.
>

you're right, the BGL uses the default new operator to allocate memory
which then isn't collected of course.
so this makes it effectively impossible to use BGL with boehm GC.
is there a boost guideline to allocate memory only through allocators
which is violated here?

(the "new" which is causing the leak(or one of your leaks?) in your code
is at line 278 of graph/detail/adjacency_list.hpp in version 1.32)

-- 
Stefan Strasser

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