Re: gtk2-perl / a script to help converting basic functions
- From: Guillaume Cottenceau <gc mandrakesoft com>
- To: Daniel Lacroix <dlacroix erasme org>
- Cc: gtk-perl-list gnome org
- Subject: Re: gtk2-perl / a script to help converting basic functions
- Date: 23 Oct 2002 11:44:35 +0200
Daniel Lacroix <dlacroix erasme org> writes:
Which is correct, and pretty helpful :).
I don't share to point of view. The gtkperl_text_buffer_get_text
function is not correct. It will create a memory leak in Gtk2-Perl. The
gtk_text_buffer_get_text function like many other is returning an
allocated string which must be freed with g_free when we no more need
it. This is often the case for function which return char *.
I think that we must copy the string in a perl string and g_free the
return value before exiting the function. I have not the solution
("code") for now but you must be aware of that I try to correct this.
I see - while this is not strictly a problem from the script,
the rest of the code probably containing more occurence of the
like.
Do we have an helpful tool to efficiently/easily check for memory
leaks?
--
Guillaume Cottenceau - http://people.mandrakesoft.com/~gc/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]