Re: creating a vector of a vector of Gtk::ToggleButton



On Wed, 2004-10-27 at 23:48, Paul Davis wrote:

> your mileage may vary as to whether you consider a ToggleButton to
> have "weight". note that this approach also means that vector::clear()
> (and container::clear() in general) does *not* free the objects
> pointed to, which can be problematic sometimes.

I second that.  I usually use a smartptr to deal with the delete problem
in STL containers.  

<blatant plug>
If you don't want to use the boost lib, there's a decent smart pointer
implementation that I'm maintaining (originally from Kevin S. Van Horn)
at http://www.3sinc.com/opensource/  that should do the trick. 
</blatant plug>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]