From 04688b92fff1d6bbec9335b354f3751ddc473379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Fri, 4 Jun 2021 18:03:15 +0200 Subject: Rename Reference to RefCounted --- doc/classes/WeakRef.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc/classes/WeakRef.xml') diff --git a/doc/classes/WeakRef.xml b/doc/classes/WeakRef.xml index 4140df5828..6c9a7de67f 100644 --- a/doc/classes/WeakRef.xml +++ b/doc/classes/WeakRef.xml @@ -1,10 +1,10 @@ - + Holds an [Object], but does not contribute to the reference count if the object is a reference. - A weakref can hold a [Reference], without contributing to the reference counter. A weakref can be created from an [Object] using [method @GlobalScope.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 each other. Without weakrefs, using these classes could lead to memory leaks, since both references keep each other 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 [RefCounted], without contributing to the reference counter. A weakref can be created from an [Object] using [method @GlobalScope.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 each other. Without weakrefs, using these classes could lead to memory leaks, since both references keep each other from being released. Making part of the variables a weakref can prevent this cyclic dependency, and allows the references to be released. -- cgit v1.2.3