diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-07-24 23:07:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-24 23:07:30 +0200 |
commit | 72c2f7ef160f37fdd0b0412d9b329e6c7b67a721 (patch) | |
tree | 5d1acde6740da9cd5ae636e4ba92fae54f63f329 /thirdparty/harfbuzz/src/hb-object.hh | |
parent | 0d1dacc902904d6eedc74f9a0a04069e6111591d (diff) | |
parent | 5f5a9f256cad866172c18939e31162ba038ac02e (diff) |
Merge pull request #63404 from bruvzg/hb-501
Diffstat (limited to 'thirdparty/harfbuzz/src/hb-object.hh')
-rw-r--r-- | thirdparty/harfbuzz/src/hb-object.hh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/thirdparty/harfbuzz/src/hb-object.hh b/thirdparty/harfbuzz/src/hb-object.hh index 4b5bc32ade..f6c7a56991 100644 --- a/thirdparty/harfbuzz/src/hb-object.hh +++ b/thirdparty/harfbuzz/src/hb-object.hh @@ -222,8 +222,11 @@ static inline Type *hb_object_create () if (unlikely (!obj)) return obj; + new (obj) Type; + hb_object_init (obj); hb_object_trace (obj, HB_FUNC); + return obj; } template <typename Type> @@ -269,6 +272,9 @@ static inline bool hb_object_destroy (Type *obj) return false; hb_object_fini (obj); + + obj->~Type (); + return true; } template <typename Type> @@ -280,7 +286,7 @@ static inline void hb_object_fini (Type *obj) { user_data->fini (); hb_free (user_data); - user_data = nullptr; + obj->header.user_data.set_relaxed (nullptr); } } template <typename Type> |