# \[patch\] Leak and typo fix

**URL:** <https://www.ruby-forum.com/t/patch-leak-and-typo-fix/110346>\
**Category:** Ruby-Gnome 2\
**Created:** [July 25, 2007, 5:04pm UTC](https://www.ruby-forum.com/t/patch-leak-and-typo-fix/110346 "2007-07-25T17:04:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sschunselaar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/34f0e0/32.png) [@sschunselaar](https://www.ruby-forum.com/u/sschunselaar)\
**Post date:** [July 25, 2007, 5:04pm UTC](https://www.ruby-forum.com/t/patch-leak-and-typo-fix/110346/1 "2007-07-25T17:04:47Z")

</div>

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.

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

Ok to commit these ?

```
Sjoerd
```

---

<div class="post-metadata">

**Author:** ![sschunselaar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/34f0e0/32.png) [@sschunselaar](https://www.ruby-forum.com/u/sschunselaar)\
**Post date:** [July 25, 2007, 5:52pm UTC](https://www.ruby-forum.com/t/patch-leak-and-typo-fix/110346/2 "2007-07-25T17:52:48Z")

</div>

Hi,

On Wed, 25 Jul 2007 17:03:57 +0200  
Sjoerd S. [removed\_email\_address@domain.invalid](mailto: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](mailto:removed_email_address@domain.invalid)

* * *

This [SF.net](http://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/](http://get.splunk.com/)
