diff --git a/api/sixtyfps-cpp/include/vtable.h b/api/sixtyfps-cpp/include/vtable.h index c9146269e..1f1092d48 100644 --- a/api/sixtyfps-cpp/include/vtable.h +++ b/api/sixtyfps-cpp/include/vtable.h @@ -13,6 +13,7 @@ LICENSE END */ #include #include #include +#include namespace vtable { @@ -67,8 +68,8 @@ struct VRcInner { private: VRcInner() : layout {} {} const VTable *vtable = &X::static_vtable; - int strong_ref = 1; - int weak_ref = 1; + std::atomic strong_ref = 1; + std::atomic weak_ref = 1; std::uint16_t data_offset = offsetof(VRcInner, data); union { X data;