Re: Freeing state.items GList in pango_layout_check_lines()?



On Mon, 2005-05-02 at 17:10 +0100, Tony Graham wrote:
> In pango_layout_check_lines() in pango/pango-layout.c, it seems to me
> that the GList created by pango_itemize_with_base_dir():
> 
>       state.items = pango_itemize_with_base_dir (layout->context,
> 						 base_dir,
> 						 layout->text,
> 						 start - layout->text,
> 						 end - start,
> 						 attrs,
> 						 iter);
> 
> is not freed or otherwise unreferenced when 'state' goes out of scope.
> 
> Is that correct?

I think the ownership of the items is implicitly taken over by the
PangoLayoutLine/PangoLayoutRun as they are created.

When the line is freed with pango_layout_line_unref() it calls
free_run() and that calls pango_item_free().

Damon





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