Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.72 KB | None | 0 0
  1. -------------------
  2.  
  3. Ref: 4
  4. Godot side
  5. in Sprite::get_texture()
  6. Ref<T> constructor, for returning the texture
  7.  
  8. Ref: 5
  9. Godot side
  10. in MethodBind0RC<Sprite, Ref<Texture>>::ptrcall:650
  11. Ref<T> constructor for argument to PtrToArg<R>::encode
  12.  
  13. Ref: 6
  14. Godot side
  15. in MethodBind0RC<Sprite, Ref<Texture>>::ptrcall:650
  16. in PtrToArg<Ref<Texture>>::encode:314
  17. assign reference with operator=
  18.  
  19. Unref: 5
  20. Godot side
  21. in MethodBind0RC<Sprite, Ref<Texture>>::ptrcall:650
  22. in PtrToArg<Ref<Texture>>::encode:315
  23. exiting function, call destructor of Ref parameter
  24.  
  25. Unref: 4
  26. Godot side
  27. in MethodBind0RC<Sprite, Ref<Texture>>::ptrcall:651
  28. exiting function, call destructor of Ref... not sure why
  29.  
  30. Ref: 5
  31. Godot side
  32. creating a Variant in CppBindings:
  33. return Ref<Texture>(___godot_icall_Object(mb, (godot_object *) this));
  34. I HAVE NO IDEA WHY
  35. godot_variant_new_object:164
  36. The type in argument is a Reference, so create a Ref
  37. Ref<T> constructor
  38.  
  39. Ref: 6
  40. Godot side
  41. godot_variant_new_object:164:
  42. ref = REF(reference);
  43. assign the reference to a variable, operator=
  44.  
  45. Unref: 5
  46. Godot side
  47. godot_variant_new_object:165
  48. Destroy temporary Ref that we created in previous assignment
  49.  
  50. Ref: 6
  51. Godot side
  52. godot_variant_new_object:167
  53. get_ref_ptr:137
  54. Getting a RefPtr, involves copy of the ref into a RefPtr: operator=
  55.  
  56. Ref: 7
  57. Godot side
  58. godot_variant_new_object:167
  59. get_ref_ptr:137
  60. RefPtr::RefPtr(const RefPtr &other): 59
  61. Ref<T>::operator=
  62. Returning the RefPtr from Variant::get_ref_ptr, involves creating a copy of RefPtr
  63.  
  64. Unref: 6
  65. Godot side
  66. godot_variant_new_object:167
  67. get_ref_ptr:137
  68. RefPtr::~RefPtr
  69. Destroy temporary RefPtr used during previous copy, I guess...
  70.  
  71. Ref: 7
  72. Godot side
  73. godot_variant_new_object:167
  74. Variant::Variant
  75. Back to here:
  76. memnew_placement_custom(dest, Variant, Variant(ref.get_ref_ptr()));
  77. Constructing the variant from the RefPtr, assign to .ref, operator=
  78.  
  79. Unref: 6
  80. Godot side
  81. godot_variant_new_object:168
  82. RefPtr::~RefPtr
  83. Destruction of the temporary RefPtr we just sent to Variant
  84. ...
  85. Debugger stays at the same breakpoint, so clicking "continue" again...
  86.  
  87. Unref: 5
  88. Godot side
  89. godot_variant_new_object:176
  90. Ref<T>::~Ref<T>
  91. End of function, destruction of the local Ref
  92.  
  93. Ref: 6
  94. Bindings side:
  95. return Ref<Texture>(___godot_icall_Object(mb, (godot_object *) this));
  96. Ref<T>(const Variant &) constructor
  97. Constructing the Variant for the return value in the NativeScript
  98.  
  99. Unref: 5
  100. Godot side
  101. Variant::~Variant()
  102. RefPtr::unref
  103. Destroying the variant we just created
  104.  
  105. Unref: 4
  106. Bindings side
  107. MethodBind0R<Reference, bool>::ptrcall
  108. Destroying the ref because we don't store it anywhere (that's end of the test)
  109.  
  110. ---------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement