فهرست منبع

Merge pull request #928 from hungrymonkey/fix_ref_bug

Fixes a bug in the example code in object type. Ref<MyReference> myre…
Rémi Verschelde 7 سال پیش
والد
کامیت
97a3b83f7a
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      development/cpp/object_class.rst

+ 1 - 1
development/cpp/object_class.rst

@@ -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.