Fix GDNative compat breakage due to dangling Variants fix

This moves the instance id member from Variant to the ObjectRC so that Variant is still the same size as before the fix (and also regardless if debug or release build).
This commit is contained in:
Pedro J. Estébanez
2020-04-27 13:07:52 +02:00
parent 0233b7e51f
commit ac8b4708a3
5 changed files with 20 additions and 23 deletions

View File

@ -139,12 +139,6 @@ private:
// Will be null for every type deriving from Reference as they have their
// own reference count mechanism
ObjectRC *rc;
// This is for allowing debug build to check for instance ID validity,
// so warnings are shown in debug builds when a stray Variant (one pointing
// to a released Object) would have happened.
// If it's zero, that means the Variant is has a legit null object value,
// thus not needing instance id validation.
ObjectID instance_id;
#else
Object *obj;
#endif