[Gtk-sharp-list] GLib.Global.ProgramName shouldn't be freed
Mike Kestner
mkestner at gmail.com
Sat Apr 21 22:48:12 UTC 2012
I fixed this on 2-12-branch and master. Thanks for the report.
Mike
On Fri, Apr 20, 2012 at 10:14 AM, Andres G. Aragoneses <knocte at gmail.com>wrote:
>
> Nice!, can you file a bug, or open a pull request to fix it?
>
> Thanks!
>
>
> On 04/11/2012 01:16 PM, Antonio Macrì wrote:
>
>> As stated in GTK documentation about g_get_prgname
>> (http://www.gtk.org/api/2.6/**glib/glib-Miscellaneous-**
>> Utility-Functions.html#g-get-**prgname<http://www.gtk.org/api/2.6/glib/glib-Miscellaneous-Utility-Functions.html#g-get-prgname>
>> )
>> <http://www.gtk.org/api/2.6/**glib/glib-Miscellaneous-**
>> Utility-Functions.html#g-get-**prgname<http://www.gtk.org/api/2.6/glib/glib-Miscellaneous-Utility-Functions.html#g-get-prgname>
>> >:
>>
>>
>> The returned string belongs to GLib and must not be modified or freed.
>>
>> But the current implementation of GLib.Global.get_ProgramName is:
>>
>> get
>> {
>> return Marshaller.PtrToStringGFree(**Global.g_get_prgname());
>> }
>>
>> In fact, when I try to use ProgramName, the first time it works well,
>> but from the second on it contains garbage.
>>
>> The same problem seems to affect ApplicationName, although the GTK
>> documentation doesn't explicitly say that it must not be freed.
>>
>> Regards,
>> Antonio
>> ______________________________**_________________
>> Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.**com<Gtk-sharp-list at lists.ximian.com>
>> http://lists.ximian.com/**mailman/listinfo/gtk-sharp-**list<http://lists.ximian.com/mailman/listinfo/gtk-sharp-list>
>>
>>
>
> ______________________________**_________________
> Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.**com<Gtk-sharp-list at lists.ximian.com>
> http://lists.ximian.com/**mailman/listinfo/gtk-sharp-**list<http://lists.ximian.com/mailman/listinfo/gtk-sharp-list>
>
--
Mike Kestner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20120421/9c27a698/attachment.html>
More information about the Gtk-sharp-list
mailing list