Re: Canvas item destructors



On Wed, 2006-07-26 at 18:26 +0200, Murray Cumming wrote:
> On Thu, 2006-07-27 at 02:22 +1000, Jean-Marc Valin wrote:
> > > Sorry, I looked that the examples/canvas/ example (in the
> > > libgnomecanvasmm tarball), and discovered for sure that the example does
> > > delete the child items explicitly.
> > > 
> > > I haven't seen an example that uses manage() with canvas items.
> > 
> > I have just looked at the C version (libgnomecanvas/demos/) and they do
> > *not* explicitly delete the child items. If both sets of examples are
> > correct, then the C++ bindings changed the semantics, which is quite
> > annoying.
> 
> I'm not aware of that, but I haven't looked at the libgnomecanvasmm
> source recently. It's even possible that the examples do this because 
> a) maybe you can delete them yourself too, if you like.
> b) Something in libgnomecanvasmm broke the automatic-destruction and
> when we wrote the examples we didn't know that automatic-destruction was
> even a possibility.
> 
> However, it's also possible that the semantics have indeed been changed.
> We do this with regular GTK+ objects, so that you get the normal C++
> memory management. But uou can get the C-style behaviour with
> Gtk::manage(). Maybe Gtk::manage() should work with GnomeCanvas, and
> maybe you'd like to file a bug about that.

For the other readers, this is filed as:
http://bugzilla.gnome.org/show_bug.cgi?id=348809

It would be nice if someone investigated.

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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