Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -------------------
- Ref: 4
- Godot side
- in Sprite::get_texture()
- Ref<T> constructor, for returning the texture
- Ref: 5
- Godot side
- in MethodBind0RC<Sprite, Ref<Texture>>::ptrcall:650
- Ref<T> constructor for argument to PtrToArg<R>::encode
- Ref: 6
- Godot side
- in MethodBind0RC<Sprite, Ref<Texture>>::ptrcall:650
- in PtrToArg<Ref<Texture>>::encode:314
- assign reference with operator=
- Unref: 5
- Godot side
- in MethodBind0RC<Sprite, Ref<Texture>>::ptrcall:650
- in PtrToArg<Ref<Texture>>::encode:315
- exiting function, call destructor of Ref parameter
- Unref: 4
- Godot side
- in MethodBind0RC<Sprite, Ref<Texture>>::ptrcall:651
- exiting function, call destructor of Ref... not sure why
- Ref: 5
- Godot side
- creating a Variant in CppBindings:
- return Ref<Texture>(___godot_icall_Object(mb, (godot_object *) this));
- I HAVE NO IDEA WHY
- godot_variant_new_object:164
- The type in argument is a Reference, so create a Ref
- Ref<T> constructor
- Ref: 6
- Godot side
- godot_variant_new_object:164:
- ref = REF(reference);
- assign the reference to a variable, operator=
- Unref: 5
- Godot side
- godot_variant_new_object:165
- Destroy temporary Ref that we created in previous assignment
- Ref: 6
- Godot side
- godot_variant_new_object:167
- get_ref_ptr:137
- Getting a RefPtr, involves copy of the ref into a RefPtr: operator=
- Ref: 7
- Godot side
- godot_variant_new_object:167
- get_ref_ptr:137
- RefPtr::RefPtr(const RefPtr &other): 59
- Ref<T>::operator=
- Returning the RefPtr from Variant::get_ref_ptr, involves creating a copy of RefPtr
- Unref: 6
- Godot side
- godot_variant_new_object:167
- get_ref_ptr:137
- RefPtr::~RefPtr
- Destroy temporary RefPtr used during previous copy, I guess...
- Ref: 7
- Godot side
- godot_variant_new_object:167
- Variant::Variant
- Back to here:
- memnew_placement_custom(dest, Variant, Variant(ref.get_ref_ptr()));
- Constructing the variant from the RefPtr, assign to .ref, operator=
- Unref: 6
- Godot side
- godot_variant_new_object:168
- RefPtr::~RefPtr
- Destruction of the temporary RefPtr we just sent to Variant
- ...
- Debugger stays at the same breakpoint, so clicking "continue" again...
- Unref: 5
- Godot side
- godot_variant_new_object:176
- Ref<T>::~Ref<T>
- End of function, destruction of the local Ref
- Ref: 6
- Bindings side:
- return Ref<Texture>(___godot_icall_Object(mb, (godot_object *) this));
- Ref<T>(const Variant &) constructor
- Constructing the Variant for the return value in the NativeScript
- Unref: 5
- Godot side
- Variant::~Variant()
- RefPtr::unref
- Destroying the variant we just created
- Unref: 4
- Bindings side
- MethodBind0R<Reference, bool>::ptrcall
- Destroying the ref because we don't store it anywhere (that's end of the test)
- ---------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement