Re: Memory ownership from pango_context_load_font(..)

On Tue, May 12, 2009 at 12:29 AM, Behdad Esfahbod <behdad behdad org> wrote:
> 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

Thanks behad,

I will proceed along that path.

Is the only way to free a PangoFont * pF to do


Is there pango_font_free(pF) or similar?

Thanks again!


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]