Forum: Ruby-Gnome 2 [Patch] Don't get unnecessary gobject properties when markin

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
6bf57b10a0d04acd62b9d83a8a791327?d=identicon&s=25 unknown (Guest)
on 2006-06-08 03:15
(Received via mailing list)
Hi,

  The mark fonction for GLib::Object retrieves all properties on an
object to
  potentially mark them. While it will only actually mark them if it's
another
  object.

  Which if ofcourse kinda wastefull.. Attached patch changes the mark
function
  to only retrieve the object property if it's a GObject.. Ok to commit
?


  I was wondering why it's even the case that object which are
accessible
  through GObject properties are marked? Is it just to try to keep the
holder
  struct attached as long as we can see an easy way to get the object ?

  Sjoerd
9fe908f5593444a40be14a424c372e58?d=identicon&s=25 Masao Mutoh (Guest)
on 2006-06-09 21:27
(Received via mailing list)
Hi Sjoerd,


On Thu, 8 Jun 2006 01:11:00 +0200
sjoerd@spring.luon.net (Sjoerd Simons) wrote:

> Hi,
>
>   The mark fonction for GLib::Object retrieves all properties on an object to
>   potentially mark them. While it will only actually mark them if it's another
>   object.
>
>   Which if ofcourse kinda wastefull.. Attached patch changes the mark function
>   to only retrieve the object property if it's a GObject.. Ok to commit ?

OK, Apply it, please.

>   I was wondering why it's even the case that object which are accessible
>   through GObject properties are marked? Is it just to try to keep the holder
>   struct attached as long as we can see an easy way to get the object ?

This aims to fix GC problems. The children of Gtk::Container and
the properties of GLib::Object are managed correctly from ruby side.

--
.:% Masao Mutoh<mutoh@highway.ne.jp>
This topic is locked and can not be replied to.