mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
Merge pull request #928 from hungrymonkey/fix_ref_bug
Fixes a bug in the example code in object type. Ref<MyReference> myre…
This commit is contained in:
@@ -242,7 +242,7 @@ Declaring them must be done using Ref<> template. For example:
|
||||
GDCLASS(MyReference, Reference);
|
||||
};
|
||||
|
||||
Ref<MyReference> myref = memnew(MyReference);
|
||||
Ref<MyReference> myref(memnew(MyReference));
|
||||
|
||||
``myref`` is reference counted. It will be freed when no more Ref<>
|
||||
templates point to it.
|
||||
|
||||
Reference in New Issue
Block a user