On Fri, Jul 9, 2010 at 15:47, Urabe Shyouhei <shyouhei / ruby-lang.org> wrote:

> (2010/07/09 22:24), Nikolai Weibull wrote:

>> So basically there is no way to wrap, for example,
>>
>> http://library.gnome.org/devel/gio/stable/GFile.html#g-file-load-contents
>>
>> efficiently. Ill always have to copy the loaded contents into a new
>> Ruby String and then free the returned char * contents.

> This is absolutely true, because g_free() and ruby's xfree() are not
> guaranteed to share the same free() implementation. That can happenon
> Windows. Given g_file_load_contents()'s returning memory regions isstated to
> "be freed using g_free()", it should not be done by Ruby's.

OK, Im convinced.  Bummer.

Thank you all for taking the time to answer my questions!