Re: creating a vector of a vector of Gtk::ToggleButton
- From: Carl Nygard <cjnygard fast net>
- To: Chris Vine <chris cvine freeserve co uk>
- Cc: Paul Davis <paul linuxaudiosystems com>, gtkmm-list gnome org
- Subject: Re: creating a vector of a vector of Gtk::ToggleButton
- Date: Sat, 30 Oct 2004 11:05:39 -0400
On Sat, 2004-10-30 at 08:36, Chris Vine wrote:
> On Thursday 28 October 2004 05:04, Carl Nygard wrote:
> > 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>
>
> This is quite clever. A "swiss pen knife" of smart pointers, with four for
> the price of one - shared pointer, invasive pointer, clone-referenced-object
> pointer and a copy-referenced-object-on-write pointer. I am not sure I would
> ever want to use of the last of those.
Yeah, I usually use ::spnwm or ::spdwm in most cases.
>
> It might be useful to add a pure scoped pointer, one which does not clone a
> referenced object (even if the referenced object is cloneable) and which once
> initialised does not allow the identity of its referenced object to be
> changed. (Although I realise that a const std::autoptr will do most of this
> for you.)
patches accepted;) If I get frisky I might attempt it. My purpose for
this was pure maintainership, because Kevin was no longer making it
available.
>
> However I notice that you release it under the GPL whereas Kevin Horn released
> it as public domain. To make the library more useful it would be a good idea
> to indicate what the new code is (if any) which is GPL-only.
What makes you think that? The actual smartptr source file only shows
Kevin's original public domain license.
Personally, I'd prefer LGPL for this, and I don't really want to get
into which-piece-is-which-license for this library. But I have to
respect Kevin's wishes, and he placed it in public domain, so I'll cross
that bridge when I get to it.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]