[lazy] Add .free()
This commit is contained in:
parent
c7ca30a533
commit
7a8d480378
|
@ -454,7 +454,7 @@ static struct hb_ft_font_funcs_lazy_loader_t : hb_font_funcs_lazy_loader_t<hb_ft
|
|||
static
|
||||
void free_static_ft_funcs (void)
|
||||
{
|
||||
static_ft_funcs.fini ();
|
||||
static_ft_funcs.free ();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -394,7 +394,7 @@ static struct hb_glib_unicode_funcs_lazy_loader_t : hb_unicode_funcs_lazy_loader
|
|||
static
|
||||
void free_static_glib_funcs (void)
|
||||
{
|
||||
static_glib_funcs.fini ();
|
||||
static_glib_funcs.free ();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -373,7 +373,7 @@ static struct hb_icu_unicode_funcs_lazy_loader_t : hb_unicode_funcs_lazy_loader_
|
|||
static
|
||||
void free_static_icu_funcs (void)
|
||||
{
|
||||
static_icu_funcs.fini ();
|
||||
static_icu_funcs.free ();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -627,6 +627,10 @@ struct hb_lazy_loader_t : hb_data_wrapper_t<Data, WheresData>
|
|||
inline void init0 (void) {} /* Init, when memory is already set to 0. No-op for us. */
|
||||
inline void init (void) { instance.set_relaxed (nullptr); }
|
||||
inline void fini (void)
|
||||
{
|
||||
do_destroy (instance.get ());
|
||||
}
|
||||
inline void free (void)
|
||||
{
|
||||
retry:
|
||||
Stored *p = instance.get ();
|
||||
|
|
|
@ -264,7 +264,7 @@ static struct hb_ot_font_funcs_lazy_loader_t : hb_font_funcs_lazy_loader_t<hb_ot
|
|||
static
|
||||
void free_static_ot_funcs (void)
|
||||
{
|
||||
static_ot_funcs.fini ();
|
||||
static_ot_funcs.free ();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -267,7 +267,7 @@ static struct hb_ucdn_unicode_funcs_lazy_loader_t : hb_unicode_funcs_lazy_loader
|
|||
static
|
||||
void free_static_ucdn_funcs (void)
|
||||
{
|
||||
static_ucdn_funcs.fini ();
|
||||
static_ucdn_funcs.free ();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue