From f2a73816c2202f0f155086e451a73f76fba67c42 Mon Sep 17 00:00:00 2001 From: Jan Heemstra Date: Wed, 27 Apr 2016 15:19:12 +0200 Subject: [PATCH 1/3] Sync classes reference template with current code base --- doc/base/classes.xml | 50 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/doc/base/classes.xml b/doc/base/classes.xml index de19b1c8cad..03fdfa5f6b8 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -2900,6 +2900,12 @@ + + + + + + @@ -13895,6 +13901,12 @@ Returns an empty String "" at the end of the list. + + + + + + @@ -19126,6 +19138,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) Set the mesh of the item. + + + + + + + + @@ -19152,6 +19172,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) Return the mesh of the item. + + + + + + + + @@ -36094,6 +36122,22 @@ This method controls whether the position between two cached points is interpola + + + + + + + + + + + + + + + + @@ -37336,6 +37380,12 @@ This method controls whether the position between two cached points is interpola + + + + + + From edff81c2142f75d811263dafed42fd817e407be0 Mon Sep 17 00:00:00 2001 From: Jan Heemstra Date: Wed, 27 Apr 2016 16:10:10 +0200 Subject: [PATCH 2/3] Documented WeakRef and member functions --- doc/base/classes.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/base/classes.xml b/doc/base/classes.xml index 03fdfa5f6b8..5d8cc40a2bc 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -43298,14 +43298,17 @@ This method controls whether the position between two cached points is interpola + Holds a [Reference] object, but does not contribute to the reference count of that reference. + A weakref holds a [Reference], without contributing to it's reference counter. A weakref can be created from a reference using [method @GDScript.weakref]. Weakrefs are useful in cases where multiple classes have variables that refer to eachother. Without weakrefs, using these classes could lead to memory leaks, since both references keep eachother from being released. Making part of the variables a weakref can prevent this cyclic dependency, and allows the references to be released. - + + Returns the reference this weakref is referring to. From e301ca35447ef568d2773ab0bf90b0d0fdf9748e Mon Sep 17 00:00:00 2001 From: Jan Heemstra Date: Wed, 27 Apr 2016 17:27:01 +0200 Subject: [PATCH 3/3] fixed some mistakes in WeakRef documentation --- doc/base/classes.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/base/classes.xml b/doc/base/classes.xml index 5d8cc40a2bc..c2051c7932f 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -43298,17 +43298,17 @@ This method controls whether the position between two cached points is interpola - Holds a [Reference] object, but does not contribute to the reference count of that reference. + Holds an [Object], but does not contribute to the reference count if the object is a reference. - A weakref holds a [Reference], without contributing to it's reference counter. A weakref can be created from a reference using [method @GDScript.weakref]. Weakrefs are useful in cases where multiple classes have variables that refer to eachother. Without weakrefs, using these classes could lead to memory leaks, since both references keep eachother from being released. Making part of the variables a weakref can prevent this cyclic dependency, and allows the references to be released. + A weakref can hold a [Reference], without contributing to the reference counter. A weakref can be created from an [Object] using [method @GDScript.weakref]. If this object is not a reference, weakref still works, however, it does not have any effect on the object. Weakrefs are useful in cases where multiple classes have variables that refer to eachother. Without weakrefs, using these classes could lead to memory leaks, since both references keep eachother from being released. Making part of the variables a weakref can prevent this cyclic dependency, and allows the references to be released. - + - Returns the reference this weakref is referring to. + Returns the [Object] this weakref is referring to.