Re: creating a vector of a vector of Gtk::ToggleButton
- From: Carl Nygard <cjnygard fast net>
- To: Rob Benton <rob benton conwaycorp net>
- Cc: gtkmm-list gnome org, Paul Davis <paul linuxaudiosystems com>
- Subject: Re: creating a vector of a vector of Gtk::ToggleButton
- Date: Fri, 29 Oct 2004 00:00:29 -0400
On Thu, 2004-10-28 at 23:31, Rob Benton wrote:
> Carl Nygard wrote:
>
> > Do that. You don't want to deal with vector<chiprow*>, for the same
> > reason you don't really want the headache of
> > vector<Gtk::ToggleButton*>. You could wrap chiprow* in a smart pointer,
> > but it's totally unnecessary.
> >
> >
> cool. Now when I destroy them if I used a shared_ptr, I can just use:
>
> _chips.clear();
>
> and that should recursively call down all the shared_ptr deletes right?
> I don't have to iterate over and call clear on each vector.
>
Sure, ~vector<T>() calls the dtor for all contained objects. So all
contained shared_ptr dtor's get called.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]