[Gc] STL: allocator usage clarification
christian at gudrian.org
Fri Aug 27 00:31:32 PDT 2010
I am a little bit confused about what those "explicitly managed STL
containers" are, that are mentioned in gc_allocator.h.
I presume that if I use an STL container as an instance variable in a
garbage collected object (i.e. derived of the gc class) I need to use
gc_allocator. Whereas if I use an STL container in an "ordinary"
environment (i.e. with its destructor called at the end of its life
cycle), I should use traceable_allocator if the container may contain
pointers to garbage collected memory.
Is that correct?
More information about the Gc