diff --git a/src/hb-map.hh b/src/hb-map.hh index e5ca3f515..c54c9d7b6 100644 --- a/src/hb-map.hh +++ b/src/hb-map.hh @@ -45,8 +45,8 @@ inline uint32_t Hash (const T &v) struct hb_map_t { HB_NO_COPY_ASSIGN (hb_map_t); - inline hb_map_t (void) { init_shallow (); } - inline ~hb_map_t (void) { fini_shallow (); } + inline hb_map_t (void) { init (); } + inline ~hb_map_t (void) { fini (); } struct item_t { diff --git a/src/hb-object.hh b/src/hb-object.hh index d347b5ffa..106f59206 100644 --- a/src/hb-object.hh +++ b/src/hb-object.hh @@ -272,6 +272,7 @@ static inline void hb_object_fini (Type *obj) { user_data->fini (); free (user_data); + user_data = nullptr; } } template diff --git a/src/hb-set.hh b/src/hb-set.hh index 97ff291eb..0755498ba 100644 --- a/src/hb-set.hh +++ b/src/hb-set.hh @@ -40,8 +40,8 @@ struct hb_set_t { HB_NO_COPY_ASSIGN (hb_set_t); - inline hb_set_t (void) { init_shallow (); } - inline ~hb_set_t (void) { fini_shallow (); } + inline hb_set_t (void) { init (); } + inline ~hb_set_t (void) { fini (); } struct page_map_t {