Refcount
Signed-off-by: somebody_master <somebody_master@somebodyserver.mooo.com>
This commit is contained in:
parent
b206f3d0c7
commit
7384d4ec10
@ -1,9 +1,23 @@
|
||||
#include "test.hpp"
|
||||
|
||||
#include <godot_cpp/variant/utility_functions.hpp>
|
||||
#include <godot_cpp/variant/variant.hpp>
|
||||
|
||||
#include <godot_cpp/classes/image_texture.hpp>
|
||||
|
||||
void Test::start_test() {
|
||||
UtilityFunctions::print("Hello world form GDExtension");
|
||||
Ref<ImageTexture> tex(memnew(ImageTexture));
|
||||
|
||||
auto format = tex->get_format();
|
||||
UtilityFunctions::print(tex->get_reference_count());
|
||||
|
||||
Ref<ImageTexture> tex2 = tex;
|
||||
UtilityFunctions::print(tex->get_reference_count());
|
||||
|
||||
tex2.unref();
|
||||
UtilityFunctions::print(tex->get_reference_count());
|
||||
|
||||
tex.unref();
|
||||
}
|
||||
|
||||
void Test::_bind_methods() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user