Forum: Ruby-Gnome 2 [patch] Leak and typo fix

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 Sjoerd Simons (Guest)
on 2007-07-25 17:04
(Received via mailing list)
Hi,

  Attached are two simple patches:

  - ruby-gnome2-value-array-free.patch:
    This patch lets the signal code use the proper GValueArray api
instead of
    using it as a glorified array.

    Which has the important side-effect that on g_value_array_free does
    actually g_value_unset all items in the array. Which is important
for types
    that have _free function which is called on _unset, like all Ruby
values
    types have. Currently every time a signal is emitted containing a
ruby
    value in it's arguments a reference to that value is leaked..

    It does cause some extra work to be done as now internally
g_value_copy is
    called for each param. But this overhead should be negligible as
signals
    usually don't have a lot of params and the value copy functions
should only
    do a tiny amount of work.

  - ruby-gnome2-genum-typo.patch:
    Simple typo, using RVAL2GENUM where GENUM2RVAL should be used.

  Ok to commit these ?

    Sjoerd
9fe908f5593444a40be14a424c372e58?d=identicon&s=25 Masao Mutoh (Guest)
on 2007-07-25 17:52
(Received via mailing list)
Hi,

On Wed, 25 Jul 2007 17:03:57 +0200
Sjoerd Simons <sjoerd@spring.luon.net> wrote:

>     that have _free function which is called on _unset, like all Ruby values
>     types have. Currently every time a signal is emitted containing a ruby
>     value in it's arguments a reference to that value is leaked..
>
>     It does cause some extra work to be done as now internally g_value_copy is
>     called for each param. But this overhead should be negligible as signals
>     usually don't have a lot of params and the value copy functions should only
>     do a tiny amount of work.

Sure.

>   - ruby-gnome2-genum-typo.patch:
>     Simple typo, using RVAL2GENUM where GENUM2RVAL should be used.
>
>   Ok to commit these ?

Yes, please.

--
.:% Masao Mutoh<mutoh@highway.ne.jp>


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
This topic is locked and can not be replied to.