From: Masao M. <mu...@hi...> - 2004-12-31 11:58:18
|
Hi David, Here is a mailing list for Ruby-GNOME(1) not Ruby-GNOME2. Don't send questions for Ruby-GNOME2 here. And I've already replied same message which you posted here at "2004-12-24 21:41". See: http://sourceforge.net/mailarchive/forum.php?thread_id=6221350&forum_id=9442 On Fri, 31 Dec 2004 11:33:11 +0100 DaVinci <da...@es...> wrote: > Hello all. > > I think I have a problem with ruby-gtk2 and objects that does not > destroy, like Gtk::TextBuffer or Gtk::ListStore. > > Example: Imagine I have this class: > > ------------------------------------------- > class Texto < Gtk::ScrolledWindow > def initialize > super() > @view = Gtk.TextView.new > @buffer = @view.buffer > add(@view) > end > end > ------------------------------------------- > > This class go inside a Window, and when I destroy window, all widgets > are destroyed. But @buffer points to a Gtk::TextBuffer object, that it > is not widget and it is not destroyed (or so I think after using a > rutine that shows me which objects in ObjectSpace are destroyed or > not). > > I have tried destroying @buffer adding next code in initialize: > > @view.signal_connect('destroy') do > @buffer.destroy > end > > But with this code, I get a segment fault ([BUG]) when I try to destroy > window. > > My question is: Is it necessary to destroy buffer or is it destroyed > automatically by ruby garbage collection? > > I see same behaviour with classes relatives to Gtk::TreeView, like > Gtk::ListStore, Gtk::TreeSelection, etc... > > Please, Help!! > > Oh, and happy christmas :) > > David > > P.D: I have too problems sending messages to the list, so I use ruby > news group to inform of ruby-gnome2 more than I'd like. Sorry for > inconvenience. > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > ruby-gnome-devel-en mailing list > rub...@li... > https://lists.sourceforge.net/lists/listinfo/ruby-gnome-devel-en > |