Plug leaks
This commit is contained in:
parent
7aa12ebdff
commit
6a7ac79e26
@ -120,6 +120,13 @@ struct hb_ot_map_t {
|
|||||||
hb_ot_layout_position_lookup (font, buffer, lookup_maps[1][i].index, lookup_maps[1][i].mask);
|
hb_ot_layout_position_lookup (font, buffer, lookup_maps[1][i].index, lookup_maps[1][i].mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void finish (void) {
|
||||||
|
feature_infos.finish ();
|
||||||
|
feature_maps.finish ();
|
||||||
|
lookup_maps[0].finish ();
|
||||||
|
lookup_maps[1].finish ();
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
hb_mask_t global_mask;
|
hb_mask_t global_mask;
|
||||||
|
@ -51,6 +51,8 @@ struct hb_ot_shape_plan_t
|
|||||||
{
|
{
|
||||||
hb_ot_map_t map;
|
hb_ot_map_t map;
|
||||||
hb_ot_complex_shaper_t shaper;
|
hb_ot_complex_shaper_t shaper;
|
||||||
|
|
||||||
|
inline void finish (void) { map.finish (); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -381,6 +381,8 @@ hb_ot_shape (hb_font_t *font,
|
|||||||
|
|
||||||
hb_ot_shape_plan_internal (&plan, font->face, &buffer->props, features, num_features);
|
hb_ot_shape_plan_internal (&plan, font->face, &buffer->props, features, num_features);
|
||||||
hb_ot_shape_execute (&plan, font, buffer, features, num_features);
|
hb_ot_shape_execute (&plan, font, buffer, features, num_features);
|
||||||
|
|
||||||
|
plan.finish ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -313,6 +313,14 @@ struct hb_prealloced_array_t {
|
|||||||
{
|
{
|
||||||
return (const Type *) ::bsearch (key, array, len, sizeof (Type), (hb_compare_func_t) Type::cmp);
|
return (const Type *) ::bsearch (key, array, len, sizeof (Type), (hb_compare_func_t) Type::cmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void finish (void)
|
||||||
|
{
|
||||||
|
if (array != static_array)
|
||||||
|
free (array);
|
||||||
|
array = NULL;
|
||||||
|
allocated = len = 0;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename Type>
|
template <typename Type>
|
||||||
@ -394,7 +402,7 @@ struct hb_lockable_set_t
|
|||||||
old.finish ();
|
old.finish ();
|
||||||
l.lock ();
|
l.lock ();
|
||||||
}
|
}
|
||||||
items.shrink (0);
|
items.finish ();
|
||||||
l.unlock ();
|
l.unlock ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user