[patch] Leak and typo fix


#1

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

#2

Hi,

On Wed, 25 Jul 2007 17:03:57 +0200
Sjoerd S. removed_email_address@domain.invalid 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 M.removed_email_address@domain.invalid


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/