Re: Memory ownership from pango_context_load_font(..)
- From: Behdad Esfahbod <behdad behdad org>
- To: Martin Sevior <msevior gmail com>
- Cc: gtk-i18n-list gnome org
- Subject: Re: Memory ownership from pango_context_load_font(..)
- Date: Mon, 11 May 2009 10:29:13 -0400
On 05/11/2009 02:13 AM, Martin Sevior wrote:
HI Folks,
I'm having trouble getting to the bottom of either a
crash on exit or a memory leak issue in abiword.
I think my problem stems from the function
PangoFont * pF = pango_context_load_font( (PangoContext *context,
const
PangoFontDescription *desc);
Which returns a pointer to a PangoFont struct.
Who owns pF? Do I have to keep track of it and do a g_object_unref(pF)
when I'm finished with it?
Yes, load_font gives you a reference that you need to free.
behdad
Or will it freed when I do a g_object_unref( context)? Or is it freed
upon a different action altogether?
Thank you!
Martin Sevior
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]