summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2021-06-04 18:03:15 +0200
committerPedro J. Estébanez <pedrojrulez@gmail.com>2021-06-11 18:48:42 +0200
commit04688b92fff1d6bbec9335b354f3751ddc473379 (patch)
treef4d61f5877c7183bf6ded23878839b2124f6ecd4
parentfbb5a541ef30f41bb7814687e9cd9f11e991faa7 (diff)
Rename Reference to RefCounted
-rw-r--r--core/config/engine.cpp6
-rw-r--r--core/core_bind.cpp2
-rw-r--r--core/core_bind.h24
-rw-r--r--core/crypto/aes_context.h6
-rw-r--r--core/crypto/crypto.h10
-rw-r--r--core/crypto/crypto_core.h2
-rw-r--r--core/crypto/hashing_context.h6
-rw-r--r--core/debugger/remote_debugger_peer.h4
-rw-r--r--core/io/config_file.h6
-rw-r--r--core/io/dtls_server.h4
-rw-r--r--core/io/http_client.h6
-rw-r--r--core/io/json.h6
-rw-r--r--core/io/marshalls.cpp6
-rw-r--r--core/io/marshalls.h6
-rw-r--r--core/io/multiplayer_api.h6
-rw-r--r--core/io/net_socket.h4
-rw-r--r--core/io/packed_data_container.h4
-rw-r--r--core/io/packet_peer.h4
-rw-r--r--core/io/pck_packer.h6
-rw-r--r--core/io/resource.h6
-rw-r--r--core/io/resource_importer.h4
-rw-r--r--core/io/resource_loader.h4
-rw-r--r--core/io/resource_saver.h4
-rw-r--r--core/io/stream_peer.h6
-rw-r--r--core/io/tcp_server.h4
-rw-r--r--core/io/udp_server.h4
-rw-r--r--core/io/xml_parser.h6
-rw-r--r--core/math/a_star.h10
-rw-r--r--core/math/expression.cpp2
-rw-r--r--core/math/expression.h6
-rw-r--r--core/math/random_number_generator.h6
-rw-r--r--core/math/triangle_mesh.h6
-rw-r--r--core/object/object.cpp12
-rw-r--r--core/object/object.h6
-rw-r--r--core/object/object_id.h2
-rw-r--r--core/object/ref_counted.cpp (renamed from core/object/reference.cpp)24
-rw-r--r--core/object/ref_counted.h (renamed from core/object/reference.h)30
-rw-r--r--core/object/undo_redo.cpp24
-rw-r--r--core/object/undo_redo.h4
-rw-r--r--core/os/main_loop.h2
-rw-r--r--core/register_core_types.cpp2
-rw-r--r--core/variant/callable.cpp2
-rw-r--r--core/variant/variant.cpp38
-rw-r--r--core/variant/variant_call.cpp2
-rw-r--r--core/variant/variant_construct.cpp6
-rw-r--r--core/variant/variant_internal.h2
-rw-r--r--core/variant/variant_parser.cpp2
-rw-r--r--core/variant/variant_setget.cpp6
-rw-r--r--core/variant/variant_utility.cpp2
-rw-r--r--doc/classes/AESContext.xml2
-rw-r--r--doc/classes/AStar.xml2
-rw-r--r--doc/classes/AStar2D.xml2
-rw-r--r--doc/classes/AnimationTrackEditPlugin.xml2
-rw-r--r--doc/classes/AudioEffectInstance.xml2
-rw-r--r--doc/classes/AudioStreamPlayback.xml2
-rw-r--r--doc/classes/CameraFeed.xml2
-rw-r--r--doc/classes/CharFXTransform.xml2
-rw-r--r--doc/classes/ConfigFile.xml2
-rw-r--r--doc/classes/Crypto.xml2
-rw-r--r--doc/classes/DTLSServer.xml2
-rw-r--r--doc/classes/Directory.xml2
-rw-r--r--doc/classes/EditorExportPlugin.xml2
-rw-r--r--doc/classes/EditorFeatureProfile.xml2
-rw-r--r--doc/classes/EditorInspectorPlugin.xml2
-rw-r--r--doc/classes/EditorResourceConversionPlugin.xml2
-rw-r--r--doc/classes/EditorResourcePreviewGenerator.xml2
-rw-r--r--doc/classes/EditorSceneImporter.xml2
-rw-r--r--doc/classes/EditorScenePostImport.xml2
-rw-r--r--doc/classes/EditorScript.xml2
-rw-r--r--doc/classes/EditorTranslationParserPlugin.xml2
-rw-r--r--doc/classes/EncodedObjectAsID.xml2
-rw-r--r--doc/classes/Expression.xml2
-rw-r--r--doc/classes/File.xml2
-rw-r--r--doc/classes/HMACContext.xml2
-rw-r--r--doc/classes/HTTPClient.xml2
-rw-r--r--doc/classes/HashingContext.xml2
-rw-r--r--doc/classes/JSONParseResult.xml2
-rw-r--r--doc/classes/JSONParser.xml2
-rw-r--r--doc/classes/JavaClass.xml2
-rw-r--r--doc/classes/JavaScriptObject.xml2
-rw-r--r--doc/classes/KinematicCollision2D.xml2
-rw-r--r--doc/classes/KinematicCollision3D.xml2
-rw-r--r--doc/classes/Lightmapper.xml2
-rw-r--r--doc/classes/MeshDataTool.xml2
-rw-r--r--doc/classes/MultiplayerAPI.xml2
-rw-r--r--doc/classes/Mutex.xml2
-rw-r--r--doc/classes/Node3DGizmo.xml2
-rw-r--r--doc/classes/Object.xml4
-rw-r--r--doc/classes/PCKPacker.xml2
-rw-r--r--doc/classes/PackedDataContainerRef.xml4
-rw-r--r--doc/classes/PacketPeer.xml2
-rw-r--r--doc/classes/PhysicsShapeQueryParameters2D.xml2
-rw-r--r--doc/classes/PhysicsShapeQueryParameters3D.xml2
-rw-r--r--doc/classes/PhysicsShapeQueryResult2D.xml2
-rw-r--r--doc/classes/PhysicsShapeQueryResult3D.xml2
-rw-r--r--doc/classes/PhysicsTestMotionResult2D.xml2
-rw-r--r--doc/classes/RDAttachmentFormat.xml2
-rw-r--r--doc/classes/RDPipelineColorBlendState.xml2
-rw-r--r--doc/classes/RDPipelineColorBlendStateAttachment.xml2
-rw-r--r--doc/classes/RDPipelineDepthStencilState.xml2
-rw-r--r--doc/classes/RDPipelineMultisampleState.xml2
-rw-r--r--doc/classes/RDPipelineRasterizationState.xml2
-rw-r--r--doc/classes/RDSamplerState.xml2
-rw-r--r--doc/classes/RDShaderSource.xml2
-rw-r--r--doc/classes/RDTextureFormat.xml2
-rw-r--r--doc/classes/RDTextureView.xml2
-rw-r--r--doc/classes/RDUniform.xml2
-rw-r--r--doc/classes/RDVertexAttribute.xml2
-rw-r--r--doc/classes/RandomNumberGenerator.xml2
-rw-r--r--doc/classes/RefCounted.xml (renamed from doc/classes/Reference.xml)4
-rw-r--r--doc/classes/Resource.xml4
-rw-r--r--doc/classes/ResourceFormatLoader.xml2
-rw-r--r--doc/classes/ResourceFormatSaver.xml2
-rw-r--r--doc/classes/ResourceImporter.xml2
-rw-r--r--doc/classes/SceneState.xml2
-rw-r--r--doc/classes/SceneTreeTimer.xml2
-rw-r--r--doc/classes/Semaphore.xml2
-rw-r--r--doc/classes/SkinReference.xml2
-rw-r--r--doc/classes/StreamPeer.xml2
-rw-r--r--doc/classes/SurfaceTool.xml2
-rw-r--r--doc/classes/TCPServer.xml2
-rw-r--r--doc/classes/TextLine.xml2
-rw-r--r--doc/classes/TextParagraph.xml2
-rw-r--r--doc/classes/Thread.xml2
-rw-r--r--doc/classes/TriangleMesh.xml2
-rw-r--r--doc/classes/UDPServer.xml2
-rw-r--r--doc/classes/Variant.xml2
-rw-r--r--doc/classes/VelocityTracker3D.xml2
-rw-r--r--doc/classes/WeakRef.xml4
-rw-r--r--doc/classes/XMLParser.xml2
-rw-r--r--doc/classes/XRInterface.xml2
-rw-r--r--doc/classes/XRPositionalTracker.xml2
-rw-r--r--doc/translations/ar.po26
-rw-r--r--doc/translations/ca.po26
-rw-r--r--doc/translations/classes.pot26
-rw-r--r--doc/translations/cs.po26
-rw-r--r--doc/translations/de.po26
-rw-r--r--doc/translations/es.po28
-rw-r--r--doc/translations/fa.po26
-rw-r--r--doc/translations/fi.po26
-rw-r--r--doc/translations/fr.po26
-rw-r--r--doc/translations/id.po26
-rw-r--r--doc/translations/it.po26
-rw-r--r--doc/translations/ja.po26
-rw-r--r--doc/translations/ko.po26
-rw-r--r--doc/translations/nl.po26
-rw-r--r--doc/translations/pl.po26
-rw-r--r--doc/translations/pt_BR.po26
-rw-r--r--doc/translations/ro.po26
-rw-r--r--doc/translations/ru.po26
-rw-r--r--doc/translations/sr_Cyrl.po26
-rw-r--r--doc/translations/th.po26
-rw-r--r--doc/translations/tr.po26
-rw-r--r--doc/translations/uk.po26
-rw-r--r--doc/translations/zh_Hans.po26
-rw-r--r--doc/translations/zh_Hant.po26
-rw-r--r--editor/animation_track_editor.h4
-rw-r--r--editor/array_property_edit.h4
-rw-r--r--editor/audio_stream_preview.h4
-rw-r--r--editor/debugger/editor_debugger_server.h4
-rw-r--r--editor/dictionary_property_edit.h4
-rw-r--r--editor/editor_data.cpp2
-rw-r--r--editor/editor_export.h12
-rw-r--r--editor/editor_feature_profile.h6
-rw-r--r--editor/editor_help_search.h2
-rw-r--r--editor/editor_inspector.h4
-rw-r--r--editor/editor_properties.cpp2
-rw-r--r--editor/editor_properties_array_dict.h8
-rw-r--r--editor/editor_resource_preview.h4
-rw-r--r--editor/editor_run_script.h6
-rw-r--r--editor/editor_translation_parser.h6
-rw-r--r--editor/import/resource_importer_scene.h8
-rw-r--r--editor/multi_node_edit.h4
-rw-r--r--editor/plugins/visual_shader_editor_plugin.h8
-rw-r--r--editor/property_editor.h4
-rw-r--r--modules/csg/csg.h2
-rw-r--r--modules/fbx/data/fbx_bone.h2
-rw-r--r--modules/fbx/data/fbx_material.h6
-rw-r--r--modules/fbx/data/fbx_mesh_data.h2
-rw-r--r--modules/fbx/data/fbx_node.h2
-rw-r--r--modules/fbx/data/fbx_skeleton.h4
-rw-r--r--modules/fbx/data/pivot_transform.h4
-rw-r--r--modules/gdnative/doc_classes/GDNative.xml2
-rw-r--r--modules/gdnative/gdnative.h4
-rw-r--r--modules/gdnative/gdnative/variant.cpp12
-rw-r--r--modules/gdnative/nativescript/api_generator.cpp16
-rw-r--r--modules/gdnative/nativescript/nativescript.cpp4
-rw-r--r--modules/gdnative/pluginscript/pluginscript_script.cpp4
-rw-r--r--modules/gdscript/gdscript.cpp20
-rw-r--r--modules/gdscript/gdscript.h10
-rw-r--r--modules/gdscript/gdscript_analyzer.cpp2
-rw-r--r--modules/gdscript/gdscript_analyzer.h2
-rw-r--r--modules/gdscript/gdscript_cache.h4
-rw-r--r--modules/gdscript/gdscript_compiler.cpp2
-rw-r--r--modules/gdscript/gdscript_function.h6
-rw-r--r--modules/gdscript/gdscript_lambda_callable.h2
-rw-r--r--modules/gdscript/gdscript_parser.h2
-rw-r--r--modules/gdscript/language_server/gdscript_language_protocol.h2
-rw-r--r--modules/gdscript/language_server/gdscript_text_document.h6
-rw-r--r--modules/gdscript/language_server/gdscript_workspace.h4
-rw-r--r--modules/gdscript/language_server/lsp.hpp4
-rw-r--r--modules/gdscript/tests/gdscript_test_runner.cpp6
-rw-r--r--modules/gdscript/tests/gdscript_test_runner_suite.h8
-rw-r--r--modules/mbedtls/ssl_context_mbedtls.h6
-rw-r--r--modules/mono/csharp_script.cpp106
-rw-r--r--modules/mono/csharp_script.h4
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Build/BuildInfo.cs2
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Build/BuildOutputView.cs2
-rw-r--r--modules/mono/editor/bindings_generator.cpp14
-rw-r--r--modules/mono/editor/bindings_generator.h10
-rw-r--r--modules/mono/glue/base_object_glue.cpp20
-rw-r--r--modules/mono/glue/glue_header.h2
-rw-r--r--modules/mono/mono_gc_handle.h6
-rw-r--r--modules/mono/mono_gd/gd_mono_internals.cpp12
-rw-r--r--modules/mono/mono_gd/gd_mono_marshal.cpp4
-rw-r--r--modules/mono/mono_gd/gd_mono_utils.cpp10
-rw-r--r--modules/mono/mono_gd/gd_mono_utils.h2
-rw-r--r--modules/mono/signal_awaiter_utils.h2
-rw-r--r--modules/opensimplex/noise_texture.h2
-rw-r--r--modules/opensimplex/open_simplex_noise.h2
-rw-r--r--modules/pvr/image_compress_pvrtc.cpp2
-rw-r--r--modules/raycast/raycast_occlusion_cull.h2
-rw-r--r--modules/regex/doc_classes/RegEx.xml2
-rw-r--r--modules/regex/doc_classes/RegExMatch.xml2
-rw-r--r--modules/regex/regex.h10
-rw-r--r--modules/upnp/doc_classes/UPNP.xml2
-rw-r--r--modules/upnp/doc_classes/UPNPDevice.xml2
-rw-r--r--modules/upnp/upnp.h6
-rw-r--r--modules/upnp/upnp_device.h6
-rw-r--r--modules/visual_script/doc_classes/VisualScriptFunctionState.xml2
-rw-r--r--modules/visual_script/visual_script.h4
-rw-r--r--modules/visual_script/visual_script_builtin_funcs.cpp2
-rw-r--r--modules/webrtc/doc_classes/WebRTCPeerConnection.xml2
-rw-r--r--modules/webrtc/webrtc_multiplayer.h2
-rw-r--r--modules/webrtc/webrtc_peer_connection.h4
-rw-r--r--modules/websocket/emws_server.h2
-rw-r--r--modules/websocket/websocket_server.h2
-rw-r--r--modules/websocket/wsl_server.h2
-rw-r--r--platform/android/api/java_class_wrapper.h10
-rw-r--r--platform/android/java_class_wrapper.cpp4
-rw-r--r--platform/javascript/api/javascript_singleton.h6
-rw-r--r--platform/javascript/export/export.cpp2
-rw-r--r--scene/2d/physics_body_2d.h4
-rw-r--r--scene/3d/lightmapper.h12
-rw-r--r--scene/3d/node_3d.h4
-rw-r--r--scene/3d/physics_body_3d.h4
-rw-r--r--scene/3d/skeleton_3d.h4
-rw-r--r--scene/3d/velocity_tracker_3d.h4
-rw-r--r--scene/animation/animation_player.h4
-rw-r--r--scene/gui/rich_text_effect.h4
-rw-r--r--scene/main/scene_tree.h4
-rw-r--r--scene/resources/mesh_data_tool.h4
-rw-r--r--scene/resources/packed_scene.h4
-rw-r--r--scene/resources/surface_tool.h4
-rw-r--r--scene/resources/text_line.h4
-rw-r--r--scene/resources/text_paragraph.h4
-rw-r--r--servers/audio/audio_effect.h4
-rw-r--r--servers/audio/audio_stream.h4
-rw-r--r--servers/audio/effects/audio_effect_capture.h2
-rw-r--r--servers/camera/camera_feed.h4
-rw-r--r--servers/camera_server.h2
-rw-r--r--servers/physics_server_2d.h14
-rw-r--r--servers/physics_server_3d.h8
-rw-r--r--servers/rendering/rendering_device_binds.h48
-rw-r--r--servers/text_server.h2
-rw-r--r--servers/xr/xr_interface.h4
-rw-r--r--servers/xr/xr_positional_tracker.h4
-rw-r--r--servers/xr_server.h2
-rw-r--r--tests/test_class_db.h8
-rw-r--r--tests/test_object.h4
270 files changed, 926 insertions, 926 deletions
diff --git a/core/config/engine.cpp b/core/config/engine.cpp
index c43e32868c..99ec1aeb5b 100644
--- a/core/config/engine.cpp
+++ b/core/config/engine.cpp
@@ -232,9 +232,9 @@ Engine::Singleton::Singleton(const StringName &p_name, Object *p_ptr) :
name(p_name),
ptr(p_ptr) {
#ifdef DEBUG_ENABLED
- Reference *ref = Object::cast_to<Reference>(p_ptr);
- if (ref && !ref->is_referenced()) {
- WARN_PRINT("You must use Ref<> to ensure the lifetime of a Reference object intended to be used as a singleton.");
+ RefCounted *rc = Object::cast_to<RefCounted>(p_ptr);
+ if (rc && !rc->is_referenced()) {
+ WARN_PRINT("You must use Ref<> to ensure the lifetime of a RefCounted object intended to be used as a singleton.");
}
#endif
}
diff --git a/core/core_bind.cpp b/core/core_bind.cpp
index 81d229ae92..b8d5572ecc 100644
--- a/core/core_bind.cpp
+++ b/core/core_bind.cpp
@@ -2074,7 +2074,7 @@ Variant _ClassDB::instance(const StringName &p_class) const {
return Variant();
}
- Reference *r = Object::cast_to<Reference>(obj);
+ RefCounted *r = Object::cast_to<RefCounted>(obj);
if (r) {
return REF(r);
} else {
diff --git a/core/core_bind.h b/core/core_bind.h
index e47d6dc0d5..46a6b23cf8 100644
--- a/core/core_bind.h
+++ b/core/core_bind.h
@@ -353,8 +353,8 @@ public:
_Geometry3D() { singleton = this; }
};
-class _File : public Reference {
- GDCLASS(_File, Reference);
+class _File : public RefCounted {
+ GDCLASS(_File, RefCounted);
FileAccess *f = nullptr;
bool big_endian = false;
@@ -455,8 +455,8 @@ public:
VARIANT_ENUM_CAST(_File::ModeFlags);
VARIANT_ENUM_CAST(_File::CompressionMode);
-class _Directory : public Reference {
- GDCLASS(_Directory, Reference);
+class _Directory : public RefCounted {
+ GDCLASS(_Directory, RefCounted);
DirAccess *d;
bool dir_open = false;
@@ -525,8 +525,8 @@ public:
~_Marshalls() { singleton = nullptr; }
};
-class _Mutex : public Reference {
- GDCLASS(_Mutex, Reference);
+class _Mutex : public RefCounted {
+ GDCLASS(_Mutex, RefCounted);
Mutex mutex;
static void _bind_methods();
@@ -537,8 +537,8 @@ public:
void unlock();
};
-class _Semaphore : public Reference {
- GDCLASS(_Semaphore, Reference);
+class _Semaphore : public RefCounted {
+ GDCLASS(_Semaphore, RefCounted);
Semaphore semaphore;
static void _bind_methods();
@@ -549,8 +549,8 @@ public:
void post();
};
-class _Thread : public Reference {
- GDCLASS(_Thread, Reference);
+class _Thread : public RefCounted {
+ GDCLASS(_Thread, RefCounted);
protected:
Variant ret;
@@ -666,8 +666,8 @@ public:
class _JSON;
-class JSONParseResult : public Reference {
- GDCLASS(JSONParseResult, Reference);
+class JSONParseResult : public RefCounted {
+ GDCLASS(JSONParseResult, RefCounted);
friend class _JSON;
diff --git a/core/crypto/aes_context.h b/core/crypto/aes_context.h
index cc00b18fd2..2f8422f537 100644
--- a/core/crypto/aes_context.h
+++ b/core/crypto/aes_context.h
@@ -32,10 +32,10 @@
#define AES_CONTEXT_H
#include "core/crypto/crypto_core.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
-class AESContext : public Reference {
- GDCLASS(AESContext, Reference);
+class AESContext : public RefCounted {
+ GDCLASS(AESContext, RefCounted);
public:
enum Mode {
diff --git a/core/crypto/crypto.h b/core/crypto/crypto.h
index 9438fcfea5..a2ccbba58a 100644
--- a/core/crypto/crypto.h
+++ b/core/crypto/crypto.h
@@ -35,7 +35,7 @@
#include "core/io/resource.h"
#include "core/io/resource_loader.h"
#include "core/io/resource_saver.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
class CryptoKey : public Resource {
GDCLASS(CryptoKey, Resource);
@@ -67,8 +67,8 @@ public:
virtual Error save(String p_path) = 0;
};
-class HMACContext : public Reference {
- GDCLASS(HMACContext, Reference);
+class HMACContext : public RefCounted {
+ GDCLASS(HMACContext, RefCounted);
protected:
static void _bind_methods();
@@ -84,8 +84,8 @@ public:
HMACContext() {}
};
-class Crypto : public Reference {
- GDCLASS(Crypto, Reference);
+class Crypto : public RefCounted {
+ GDCLASS(Crypto, RefCounted);
protected:
static void _bind_methods();
diff --git a/core/crypto/crypto_core.h b/core/crypto/crypto_core.h
index 27b380e838..7a2f4df589 100644
--- a/core/crypto/crypto_core.h
+++ b/core/crypto/crypto_core.h
@@ -31,7 +31,7 @@
#ifndef CRYPTO_CORE_H
#define CRYPTO_CORE_H
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
class CryptoCore {
public:
diff --git a/core/crypto/hashing_context.h b/core/crypto/hashing_context.h
index 892a48a4e8..31521a147c 100644
--- a/core/crypto/hashing_context.h
+++ b/core/crypto/hashing_context.h
@@ -31,10 +31,10 @@
#ifndef HASHING_CONTEXT_H
#define HASHING_CONTEXT_H
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
-class HashingContext : public Reference {
- GDCLASS(HashingContext, Reference);
+class HashingContext : public RefCounted {
+ GDCLASS(HashingContext, RefCounted);
public:
enum HashType {
diff --git a/core/debugger/remote_debugger_peer.h b/core/debugger/remote_debugger_peer.h
index 652e2d9d20..8cba53a81c 100644
--- a/core/debugger/remote_debugger_peer.h
+++ b/core/debugger/remote_debugger_peer.h
@@ -32,12 +32,12 @@
#define REMOTE_DEBUGGER_PEER_H
#include "core/io/stream_peer_tcp.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/os/mutex.h"
#include "core/os/thread.h"
#include "core/string/ustring.h"
-class RemoteDebuggerPeer : public Reference {
+class RemoteDebuggerPeer : public RefCounted {
protected:
int max_queued_messages = 4096;
diff --git a/core/io/config_file.h b/core/io/config_file.h
index 3b2321b15a..dbba43ace5 100644
--- a/core/io/config_file.h
+++ b/core/io/config_file.h
@@ -32,12 +32,12 @@
#define CONFIG_FILE_H
#include "core/io/file_access.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/templates/ordered_hash_map.h"
#include "core/variant/variant_parser.h"
-class ConfigFile : public Reference {
- GDCLASS(ConfigFile, Reference);
+class ConfigFile : public RefCounted {
+ GDCLASS(ConfigFile, RefCounted);
OrderedHashMap<String, OrderedHashMap<String, Variant>> values;
diff --git a/core/io/dtls_server.h b/core/io/dtls_server.h
index 92b6caf508..02a32533e1 100644
--- a/core/io/dtls_server.h
+++ b/core/io/dtls_server.h
@@ -34,8 +34,8 @@
#include "core/io/net_socket.h"
#include "core/io/packet_peer_dtls.h"
-class DTLSServer : public Reference {
- GDCLASS(DTLSServer, Reference);
+class DTLSServer : public RefCounted {
+ GDCLASS(DTLSServer, RefCounted);
protected:
static DTLSServer *(*_create)();
diff --git a/core/io/http_client.h b/core/io/http_client.h
index ec4b86b26f..f70999836f 100644
--- a/core/io/http_client.h
+++ b/core/io/http_client.h
@@ -34,10 +34,10 @@
#include "core/io/ip.h"
#include "core/io/stream_peer.h"
#include "core/io/stream_peer_tcp.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
-class HTTPClient : public Reference {
- GDCLASS(HTTPClient, Reference);
+class HTTPClient : public RefCounted {
+ GDCLASS(HTTPClient, RefCounted);
public:
enum ResponseCode {
diff --git a/core/io/json.h b/core/io/json.h
index f2711d8c54..bfd2347725 100644
--- a/core/io/json.h
+++ b/core/io/json.h
@@ -31,7 +31,7 @@
#ifndef JSON_H
#define JSON_H
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/variant/variant.h"
class JSON {
enum TokenType {
@@ -74,8 +74,8 @@ public:
static Error parse(const String &p_json, Variant &r_ret, String &r_err_str, int &r_err_line);
};
-class JSONParser : public Reference {
- GDCLASS(JSONParser, Reference);
+class JSONParser : public RefCounted {
+ GDCLASS(JSONParser, RefCounted);
Variant data;
String string;
diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp
index 18e1092c26..4c58c84c14 100644
--- a/core/io/marshalls.cpp
+++ b/core/io/marshalls.cpp
@@ -30,7 +30,7 @@
#include "marshalls.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/os/keyboard.h"
#include "core/string/print_string.h"
@@ -489,8 +489,8 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
obj->set(str, value);
}
- if (Object::cast_to<Reference>(obj)) {
- REF ref = REF(Object::cast_to<Reference>(obj));
+ if (Object::cast_to<RefCounted>(obj)) {
+ REF ref = REF(Object::cast_to<RefCounted>(obj));
r_variant = ref;
} else {
r_variant = obj;
diff --git a/core/io/marshalls.h b/core/io/marshalls.h
index cc0e9ba301..7fac708f97 100644
--- a/core/io/marshalls.h
+++ b/core/io/marshalls.h
@@ -31,7 +31,7 @@
#ifndef MARSHALLS_H
#define MARSHALLS_H
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/typedefs.h"
#include "core/variant/variant.h"
@@ -165,8 +165,8 @@ static inline double decode_double(const uint8_t *p_arr) {
return md.d;
}
-class EncodedObjectAsID : public Reference {
- GDCLASS(EncodedObjectAsID, Reference);
+class EncodedObjectAsID : public RefCounted {
+ GDCLASS(EncodedObjectAsID, RefCounted);
ObjectID id;
diff --git a/core/io/multiplayer_api.h b/core/io/multiplayer_api.h
index 6a251cf77b..43804a20ec 100644
--- a/core/io/multiplayer_api.h
+++ b/core/io/multiplayer_api.h
@@ -32,10 +32,10 @@
#define MULTIPLAYER_API_H
#include "core/io/networked_multiplayer_peer.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
-class MultiplayerAPI : public Reference {
- GDCLASS(MultiplayerAPI, Reference);
+class MultiplayerAPI : public RefCounted {
+ GDCLASS(MultiplayerAPI, RefCounted);
public:
enum RPCMode {
diff --git a/core/io/net_socket.h b/core/io/net_socket.h
index 98ff9562d9..fd7d50c704 100644
--- a/core/io/net_socket.h
+++ b/core/io/net_socket.h
@@ -32,9 +32,9 @@
#define NET_SOCKET_H
#include "core/io/ip.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
-class NetSocket : public Reference {
+class NetSocket : public RefCounted {
protected:
static NetSocket *(*_create)();
diff --git a/core/io/packed_data_container.h b/core/io/packed_data_container.h
index 7791e21bb3..40772bb2bf 100644
--- a/core/io/packed_data_container.h
+++ b/core/io/packed_data_container.h
@@ -80,8 +80,8 @@ public:
PackedDataContainer() {}
};
-class PackedDataContainerRef : public Reference {
- GDCLASS(PackedDataContainerRef, Reference);
+class PackedDataContainerRef : public RefCounted {
+ GDCLASS(PackedDataContainerRef, RefCounted);
friend class PackedDataContainer;
uint32_t offset = 0;
diff --git a/core/io/packet_peer.h b/core/io/packet_peer.h
index 9e03c44750..9a345af3d0 100644
--- a/core/io/packet_peer.h
+++ b/core/io/packet_peer.h
@@ -35,8 +35,8 @@
#include "core/object/class_db.h"
#include "core/templates/ring_buffer.h"
-class PacketPeer : public Reference {
- GDCLASS(PacketPeer, Reference);
+class PacketPeer : public RefCounted {
+ GDCLASS(PacketPeer, RefCounted);
Variant _bnd_get_var(bool p_allow_objects = false);
diff --git a/core/io/pck_packer.h b/core/io/pck_packer.h
index dec8f8748d..3d2ce8f240 100644
--- a/core/io/pck_packer.h
+++ b/core/io/pck_packer.h
@@ -31,12 +31,12 @@
#ifndef PCK_PACKER_H
#define PCK_PACKER_H
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
class FileAccess;
-class PCKPacker : public Reference {
- GDCLASS(PCKPacker, Reference);
+class PCKPacker : public RefCounted {
+ GDCLASS(PCKPacker, RefCounted);
FileAccess *file = nullptr;
int alignment = 0;
diff --git a/core/io/resource.h b/core/io/resource.h
index 75a9f928f8..028fed1c6e 100644
--- a/core/io/resource.h
+++ b/core/io/resource.h
@@ -32,7 +32,7 @@
#define RESOURCE_H
#include "core/object/class_db.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/templates/safe_refcount.h"
#include "core/templates/self_list.h"
@@ -43,8 +43,8 @@ public:
\
private:
-class Resource : public Reference {
- GDCLASS(Resource, Reference);
+class Resource : public RefCounted {
+ GDCLASS(Resource, RefCounted);
OBJ_CATEGORY("Resources");
public:
diff --git a/core/io/resource_importer.h b/core/io/resource_importer.h
index a14d6ba52c..2ceeb176e5 100644
--- a/core/io/resource_importer.h
+++ b/core/io/resource_importer.h
@@ -93,8 +93,8 @@ public:
ResourceFormatImporter();
};
-class ResourceImporter : public Reference {
- GDCLASS(ResourceImporter, Reference);
+class ResourceImporter : public RefCounted {
+ GDCLASS(ResourceImporter, RefCounted);
public:
virtual String get_importer_name() const = 0;
diff --git a/core/io/resource_loader.h b/core/io/resource_loader.h
index 914d988caa..c656b9a69c 100644
--- a/core/io/resource_loader.h
+++ b/core/io/resource_loader.h
@@ -35,8 +35,8 @@
#include "core/os/semaphore.h"
#include "core/os/thread.h"
-class ResourceFormatLoader : public Reference {
- GDCLASS(ResourceFormatLoader, Reference);
+class ResourceFormatLoader : public RefCounted {
+ GDCLASS(ResourceFormatLoader, RefCounted);
public:
enum CacheMode {
diff --git a/core/io/resource_saver.h b/core/io/resource_saver.h
index 2c9e8f1aa3..07154aac4d 100644
--- a/core/io/resource_saver.h
+++ b/core/io/resource_saver.h
@@ -33,8 +33,8 @@
#include "core/io/resource.h"
-class ResourceFormatSaver : public Reference {
- GDCLASS(ResourceFormatSaver, Reference);
+class ResourceFormatSaver : public RefCounted {
+ GDCLASS(ResourceFormatSaver, RefCounted);
protected:
static void _bind_methods();
diff --git a/core/io/stream_peer.h b/core/io/stream_peer.h
index 1e1a3e890c..effc3850af 100644
--- a/core/io/stream_peer.h
+++ b/core/io/stream_peer.h
@@ -31,10 +31,10 @@
#ifndef STREAM_PEER_H
#define STREAM_PEER_H
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
-class StreamPeer : public Reference {
- GDCLASS(StreamPeer, Reference);
+class StreamPeer : public RefCounted {
+ GDCLASS(StreamPeer, RefCounted);
OBJ_CATEGORY("Networking");
protected:
diff --git a/core/io/tcp_server.h b/core/io/tcp_server.h
index abefa53c6f..10985a04d5 100644
--- a/core/io/tcp_server.h
+++ b/core/io/tcp_server.h
@@ -36,8 +36,8 @@
#include "core/io/stream_peer.h"
#include "core/io/stream_peer_tcp.h"
-class TCPServer : public Reference {
- GDCLASS(TCPServer, Reference);
+class TCPServer : public RefCounted {
+ GDCLASS(TCPServer, RefCounted);
protected:
enum {
diff --git a/core/io/udp_server.h b/core/io/udp_server.h
index 60d03f37f0..e49a559c51 100644
--- a/core/io/udp_server.h
+++ b/core/io/udp_server.h
@@ -34,8 +34,8 @@
#include "core/io/net_socket.h"
#include "core/io/packet_peer_udp.h"
-class UDPServer : public Reference {
- GDCLASS(UDPServer, Reference);
+class UDPServer : public RefCounted {
+ GDCLASS(UDPServer, RefCounted);
protected:
enum {
diff --git a/core/io/xml_parser.h b/core/io/xml_parser.h
index 15722b611e..1113cce715 100644
--- a/core/io/xml_parser.h
+++ b/core/io/xml_parser.h
@@ -32,7 +32,7 @@
#define XML_PARSER_H
#include "core/io/file_access.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/string/ustring.h"
#include "core/templates/vector.h"
@@ -40,8 +40,8 @@
Based on irrXML (see their zlib license). Added mainly for compatibility with their Collada loader.
*/
-class XMLParser : public Reference {
- GDCLASS(XMLParser, Reference);
+class XMLParser : public RefCounted {
+ GDCLASS(XMLParser, RefCounted);
public:
//! Enumeration of all supported source text file formats
diff --git a/core/math/a_star.h b/core/math/a_star.h
index 4c61abd91c..44758cb046 100644
--- a/core/math/a_star.h
+++ b/core/math/a_star.h
@@ -31,7 +31,7 @@
#ifndef A_STAR_H
#define A_STAR_H
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/templates/oa_hash_map.h"
/**
@@ -40,8 +40,8 @@
@author Juan Linietsky <reduzio@gmail.com>
*/
-class AStar : public Reference {
- GDCLASS(AStar, Reference);
+class AStar : public RefCounted {
+ GDCLASS(AStar, RefCounted);
friend class AStar2D;
struct Point {
@@ -157,8 +157,8 @@ public:
~AStar();
};
-class AStar2D : public Reference {
- GDCLASS(AStar2D, Reference);
+class AStar2D : public RefCounted {
+ GDCLASS(AStar2D, RefCounted);
AStar astar;
bool _solve(AStar::Point *begin_point, AStar::Point *end_point);
diff --git a/core/math/expression.cpp b/core/math/expression.cpp
index f7ac44d321..0146c345f0 100644
--- a/core/math/expression.cpp
+++ b/core/math/expression.cpp
@@ -33,7 +33,7 @@
#include "core/io/marshalls.h"
#include "core/math/math_funcs.h"
#include "core/object/class_db.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/os/os.h"
#include "core/variant/variant_parser.h"
diff --git a/core/math/expression.h b/core/math/expression.h
index a6b288ed6e..aecf662d0a 100644
--- a/core/math/expression.h
+++ b/core/math/expression.h
@@ -31,10 +31,10 @@
#ifndef EXPRESSION_H
#define EXPRESSION_H
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
-class Expression : public Reference {
- GDCLASS(Expression, Reference);
+class Expression : public RefCounted {
+ GDCLASS(Expression, RefCounted);
private:
struct Input {
diff --git a/core/math/random_number_generator.h b/core/math/random_number_generator.h
index a396c2b7d7..06cd3999f3 100644
--- a/core/math/random_number_generator.h
+++ b/core/math/random_number_generator.h
@@ -32,10 +32,10 @@
#define RANDOM_NUMBER_GENERATOR_H
#include "core/math/random_pcg.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
-class RandomNumberGenerator : public Reference {
- GDCLASS(RandomNumberGenerator, Reference);
+class RandomNumberGenerator : public RefCounted {
+ GDCLASS(RandomNumberGenerator, RefCounted);
protected:
RandomPCG randbase;
diff --git a/core/math/triangle_mesh.h b/core/math/triangle_mesh.h
index 1d1dbc114b..463b0dd5c8 100644
--- a/core/math/triangle_mesh.h
+++ b/core/math/triangle_mesh.h
@@ -32,10 +32,10 @@
#define TRIANGLE_MESH_H
#include "core/math/face3.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
-class TriangleMesh : public Reference {
- GDCLASS(TriangleMesh, Reference);
+class TriangleMesh : public RefCounted {
+ GDCLASS(TriangleMesh, RefCounted);
struct Triangle {
Vector3 normal;
diff --git a/core/object/object.cpp b/core/object/object.cpp
index 7e1c3855c0..799e63a512 100644
--- a/core/object/object.cpp
+++ b/core/object/object.cpp
@@ -769,7 +769,7 @@ Variant Object::call(const StringName &p_method, const Variant **p_args, int p_a
r_error.error = Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
return Variant();
}
- if (Object::cast_to<Reference>(this)) {
+ if (Object::cast_to<RefCounted>(this)) {
r_error.argument = 0;
r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
ERR_FAIL_V_MSG(Variant(), "Can't 'free' a reference.");
@@ -1900,7 +1900,7 @@ ObjectID ObjectDB::add_instance(Object *p_object) {
object_slots = (ObjectSlot *)memrealloc(object_slots, sizeof(ObjectSlot) * new_slot_max);
for (uint32_t i = slot_max; i < new_slot_max; i++) {
object_slots[i].object = nullptr;
- object_slots[i].is_reference = false;
+ object_slots[i].is_ref_counted = false;
object_slots[i].next_free = i;
object_slots[i].validator = 0;
}
@@ -1913,7 +1913,7 @@ ObjectID ObjectDB::add_instance(Object *p_object) {
ERR_FAIL_COND_V(object_slots[slot].object != nullptr, ObjectID());
}
object_slots[slot].object = p_object;
- object_slots[slot].is_reference = p_object->is_reference();
+ object_slots[slot].is_ref_counted = p_object->is_ref_counted();
validator_counter = (validator_counter + 1) & OBJECTDB_VALIDATOR_MASK;
if (unlikely(validator_counter == 0)) {
validator_counter = 1;
@@ -1924,7 +1924,7 @@ ObjectID ObjectDB::add_instance(Object *p_object) {
id <<= OBJECTDB_SLOT_MAX_COUNT_BITS;
id |= uint64_t(slot);
- if (p_object->is_reference()) {
+ if (p_object->is_ref_counted()) {
id |= OBJECTDB_REFERENCE_BIT;
}
@@ -1962,7 +1962,7 @@ void ObjectDB::remove_instance(Object *p_object) {
object_slots[slot_count].next_free = slot;
//invalidate, so checks against it fail
object_slots[slot].validator = 0;
- object_slots[slot].is_reference = false;
+ object_slots[slot].is_ref_counted = false;
object_slots[slot].object = nullptr;
spin_lock.unlock();
@@ -1997,7 +1997,7 @@ void ObjectDB::cleanup() {
extra_info = " - Resource path: " + String(resource_get_path->call(obj, nullptr, 0, call_error));
}
- uint64_t id = uint64_t(i) | (uint64_t(object_slots[i].validator) << OBJECTDB_VALIDATOR_BITS) | (object_slots[i].is_reference ? OBJECTDB_REFERENCE_BIT : 0);
+ uint64_t id = uint64_t(i) | (uint64_t(object_slots[i].validator) << OBJECTDB_VALIDATOR_BITS) | (object_slots[i].is_ref_counted ? OBJECTDB_REFERENCE_BIT : 0);
print_line("Leaked instance: " + String(obj->get_class()) + ":" + itos(id) + extra_info);
count--;
diff --git a/core/object/object.h b/core/object/object.h
index 137025f323..37b2e61dfe 100644
--- a/core/object/object.h
+++ b/core/object/object.h
@@ -545,7 +545,7 @@ private:
_FORCE_INLINE_ void _construct_object(bool p_reference);
- friend class Reference;
+ friend class RefCounted;
bool type_is_reference = false;
SafeNumeric<uint32_t> instance_binding_count;
void *_script_instance_bindings[MAX_SCRIPT_INSTANCE_BINDINGS];
@@ -795,7 +795,7 @@ public:
void clear_internal_resource_paths();
- _ALWAYS_INLINE_ bool is_reference() const { return type_is_reference; }
+ _ALWAYS_INLINE_ bool is_ref_counted() const { return type_is_reference; }
Object();
virtual ~Object();
@@ -815,7 +815,7 @@ class ObjectDB {
struct ObjectSlot { //128 bits per slot
uint64_t validator : OBJECTDB_VALIDATOR_BITS;
uint64_t next_free : OBJECTDB_SLOT_MAX_COUNT_BITS;
- uint64_t is_reference : 1;
+ uint64_t is_ref_counted : 1;
Object *object;
};
diff --git a/core/object/object_id.h b/core/object/object_id.h
index 7f2496ad48..0666ec0855 100644
--- a/core/object/object_id.h
+++ b/core/object/object_id.h
@@ -42,7 +42,7 @@ class ObjectID {
uint64_t id = 0;
public:
- _ALWAYS_INLINE_ bool is_reference() const { return (id & (uint64_t(1) << 63)) != 0; }
+ _ALWAYS_INLINE_ bool is_ref_counted() const { return (id & (uint64_t(1) << 63)) != 0; }
_ALWAYS_INLINE_ bool is_valid() const { return id != 0; }
_ALWAYS_INLINE_ bool is_null() const { return id == 0; }
_ALWAYS_INLINE_ operator uint64_t() const { return id; }
diff --git a/core/object/reference.cpp b/core/object/ref_counted.cpp
index 086b761e95..9862624972 100644
--- a/core/object/reference.cpp
+++ b/core/object/ref_counted.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* reference.cpp */
+/* ref_counted.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,11 +28,11 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "reference.h"
+#include "ref_counted.h"
#include "core/object/script_language.h"
-bool Reference::init_ref() {
+bool RefCounted::init_ref() {
if (reference()) {
if (!is_referenced() && refcount_init.unref()) {
unreference(); // first referencing is already 1, so compensate for the ref above
@@ -44,17 +44,17 @@ bool Reference::init_ref() {
}
}
-void Reference::_bind_methods() {
- ClassDB::bind_method(D_METHOD("init_ref"), &Reference::init_ref);
- ClassDB::bind_method(D_METHOD("reference"), &Reference::reference);
- ClassDB::bind_method(D_METHOD("unreference"), &Reference::unreference);
+void RefCounted::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("init_ref"), &RefCounted::init_ref);
+ ClassDB::bind_method(D_METHOD("reference"), &RefCounted::reference);
+ ClassDB::bind_method(D_METHOD("unreference"), &RefCounted::unreference);
}
-int Reference::reference_get_count() const {
+int RefCounted::reference_get_count() const {
return refcount.get();
}
-bool Reference::reference() {
+bool RefCounted::reference() {
uint32_t rc_val = refcount.refval();
bool success = rc_val != 0;
@@ -77,7 +77,7 @@ bool Reference::reference() {
return success;
}
-bool Reference::unreference() {
+bool RefCounted::unreference() {
uint32_t rc_val = refcount.unrefval();
bool die = rc_val == 0;
@@ -102,7 +102,7 @@ bool Reference::unreference() {
return die;
}
-Reference::Reference() :
+RefCounted::RefCounted() :
Object(true) {
refcount.init();
refcount_init.init();
@@ -117,7 +117,7 @@ Variant WeakRef::get_ref() const {
if (!obj) {
return Variant();
}
- Reference *r = cast_to<Reference>(obj);
+ RefCounted *r = cast_to<RefCounted>(obj);
if (r) {
return REF(r);
}
diff --git a/core/object/reference.h b/core/object/ref_counted.h
index d02cb12069..3dd7cc456b 100644
--- a/core/object/reference.h
+++ b/core/object/ref_counted.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* reference.h */
+/* ref_counted.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,14 +28,14 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef REFERENCE_H
-#define REFERENCE_H
+#ifndef REF_COUNTED_H
+#define REF_COUNTED_H
#include "core/object/class_db.h"
#include "core/templates/safe_refcount.h"
-class Reference : public Object {
- GDCLASS(Reference, Object);
+class RefCounted : public Object {
+ GDCLASS(RefCounted, Object);
SafeRefCount refcount;
SafeRefCount refcount_init;
@@ -49,8 +49,8 @@ public:
bool unreference();
int reference_get_count() const;
- Reference();
- ~Reference() {}
+ RefCounted();
+ ~RefCounted() {}
};
template <class T>
@@ -78,7 +78,7 @@ class Ref {
}
}
- //virtual Reference * get_reference() const { return reference; }
+ //virtual RefCounted * get_reference() const { return reference; }
public:
_FORCE_INLINE_ bool operator==(const T *p_ptr) const {
return reference == p_ptr;
@@ -130,7 +130,7 @@ public:
template <class T_Other>
void operator=(const Ref<T_Other> &p_from) {
- Reference *refb = const_cast<Reference *>(static_cast<const Reference *>(p_from.ptr()));
+ RefCounted *refb = const_cast<RefCounted *>(static_cast<const RefCounted *>(p_from.ptr()));
if (!refb) {
unref();
return;
@@ -179,7 +179,7 @@ public:
template <class T_Other>
Ref(const Ref<T_Other> &p_from) {
- Reference *refb = const_cast<Reference *>(static_cast<const Reference *>(p_from.ptr()));
+ RefCounted *refb = const_cast<RefCounted *>(static_cast<const RefCounted *>(p_from.ptr()));
if (!refb) {
unref();
return;
@@ -234,10 +234,10 @@ public:
}
};
-typedef Ref<Reference> REF;
+typedef Ref<RefCounted> REF;
-class WeakRef : public Reference {
- GDCLASS(WeakRef, Reference);
+class WeakRef : public RefCounted {
+ GDCLASS(WeakRef, RefCounted);
ObjectID ref;
@@ -259,7 +259,7 @@ struct PtrToArg<Ref<T>> {
}
_FORCE_INLINE_ static void encode(Ref<T> p_val, const void *p_ptr) {
- *(Ref<Reference> *)p_ptr = p_val;
+ *(Ref<RefCounted> *)p_ptr = p_val;
}
};
@@ -294,4 +294,4 @@ struct GetTypeInfo<const Ref<T> &> {
#endif // DEBUG_METHODS_ENABLED
-#endif // REFERENCE_H
+#endif // REF_COUNTED_H
diff --git a/core/object/undo_redo.cpp b/core/object/undo_redo.cpp
index e8735e335c..96c96c1efb 100644
--- a/core/object/undo_redo.cpp
+++ b/core/object/undo_redo.cpp
@@ -122,8 +122,8 @@ void UndoRedo::add_do_method(Object *p_object, const StringName &p_method, VARIA
ERR_FAIL_COND((current_action + 1) >= actions.size());
Operation do_op;
do_op.object = p_object->get_instance_id();
- if (Object::cast_to<Reference>(p_object)) {
- do_op.ref = Ref<Reference>(Object::cast_to<Reference>(p_object));
+ if (Object::cast_to<RefCounted>(p_object)) {
+ do_op.ref = Ref<RefCounted>(Object::cast_to<RefCounted>(p_object));
}
do_op.type = Operation::TYPE_METHOD;
@@ -148,8 +148,8 @@ void UndoRedo::add_undo_method(Object *p_object, const StringName &p_method, VAR
Operation undo_op;
undo_op.object = p_object->get_instance_id();
- if (Object::cast_to<Reference>(p_object)) {
- undo_op.ref = Ref<Reference>(Object::cast_to<Reference>(p_object));
+ if (Object::cast_to<RefCounted>(p_object)) {
+ undo_op.ref = Ref<RefCounted>(Object::cast_to<RefCounted>(p_object));
}
undo_op.type = Operation::TYPE_METHOD;
@@ -167,8 +167,8 @@ void UndoRedo::add_do_property(Object *p_object, const StringName &p_property, c
ERR_FAIL_COND((current_action + 1) >= actions.size());
Operation do_op;
do_op.object = p_object->get_instance_id();
- if (Object::cast_to<Reference>(p_object)) {
- do_op.ref = Ref<Reference>(Object::cast_to<Reference>(p_object));
+ if (Object::cast_to<RefCounted>(p_object)) {
+ do_op.ref = Ref<RefCounted>(Object::cast_to<RefCounted>(p_object));
}
do_op.type = Operation::TYPE_PROPERTY;
@@ -189,8 +189,8 @@ void UndoRedo::add_undo_property(Object *p_object, const StringName &p_property,
Operation undo_op;
undo_op.object = p_object->get_instance_id();
- if (Object::cast_to<Reference>(p_object)) {
- undo_op.ref = Ref<Reference>(Object::cast_to<Reference>(p_object));
+ if (Object::cast_to<RefCounted>(p_object)) {
+ undo_op.ref = Ref<RefCounted>(Object::cast_to<RefCounted>(p_object));
}
undo_op.type = Operation::TYPE_PROPERTY;
@@ -205,8 +205,8 @@ void UndoRedo::add_do_reference(Object *p_object) {
ERR_FAIL_COND((current_action + 1) >= actions.size());
Operation do_op;
do_op.object = p_object->get_instance_id();
- if (Object::cast_to<Reference>(p_object)) {
- do_op.ref = Ref<Reference>(Object::cast_to<Reference>(p_object));
+ if (Object::cast_to<RefCounted>(p_object)) {
+ do_op.ref = Ref<RefCounted>(Object::cast_to<RefCounted>(p_object));
}
do_op.type = Operation::TYPE_REFERENCE;
@@ -225,8 +225,8 @@ void UndoRedo::add_undo_reference(Object *p_object) {
Operation undo_op;
undo_op.object = p_object->get_instance_id();
- if (Object::cast_to<Reference>(p_object)) {
- undo_op.ref = Ref<Reference>(Object::cast_to<Reference>(p_object));
+ if (Object::cast_to<RefCounted>(p_object)) {
+ undo_op.ref = Ref<RefCounted>(Object::cast_to<RefCounted>(p_object));
}
undo_op.type = Operation::TYPE_REFERENCE;
diff --git a/core/object/undo_redo.h b/core/object/undo_redo.h
index a08ca7792f..8f009830e3 100644
--- a/core/object/undo_redo.h
+++ b/core/object/undo_redo.h
@@ -32,7 +32,7 @@
#define UNDO_REDO_H
#include "core/object/class_db.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
class UndoRedo : public Object {
GDCLASS(UndoRedo, Object);
@@ -61,7 +61,7 @@ private:
};
Type type;
- Ref<Reference> ref;
+ Ref<RefCounted> ref;
ObjectID object;
StringName name;
Variant args[VARIANT_ARG_MAX];
diff --git a/core/os/main_loop.h b/core/os/main_loop.h
index 25a09fe98f..34e944709b 100644
--- a/core/os/main_loop.h
+++ b/core/os/main_loop.h
@@ -32,7 +32,7 @@
#define MAIN_LOOP_H
#include "core/input/input_event.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/object/script_language.h"
class MainLoop : public Object {
diff --git a/core/register_core_types.cpp b/core/register_core_types.cpp
index f1b1b98bea..d68fc2a2c7 100644
--- a/core/register_core_types.cpp
+++ b/core/register_core_types.cpp
@@ -131,7 +131,7 @@ void register_core_types() {
ClassDB::register_virtual_class<Script>();
- ClassDB::register_class<Reference>();
+ ClassDB::register_class<RefCounted>();
ClassDB::register_class<WeakRef>();
ClassDB::register_class<Resource>();
ClassDB::register_class<Image>();
diff --git a/core/variant/callable.cpp b/core/variant/callable.cpp
index 5c87042f6b..34b3e3ea35 100644
--- a/core/variant/callable.cpp
+++ b/core/variant/callable.cpp
@@ -33,7 +33,7 @@
#include "callable_bind.h"
#include "core/object/message_queue.h"
#include "core/object/object.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/object/script_language.h"
void Callable::call_deferred(const Variant **p_arguments, int p_argcount) const {
diff --git a/core/variant/variant.cpp b/core/variant/variant.cpp
index 2bde08742c..c3962ad873 100644
--- a/core/variant/variant.cpp
+++ b/core/variant/variant.cpp
@@ -1115,9 +1115,9 @@ void Variant::reference(const Variant &p_variant) {
case OBJECT: {
memnew_placement(_data._mem, ObjData);
- if (p_variant._get_obj().obj && p_variant._get_obj().id.is_reference()) {
- Reference *reference = static_cast<Reference *>(p_variant._get_obj().obj);
- if (!reference->reference()) {
+ if (p_variant._get_obj().obj && p_variant._get_obj().id.is_ref_counted()) {
+ RefCounted *ref_counted = static_cast<RefCounted *>(p_variant._get_obj().obj);
+ if (!ref_counted->reference()) {
_get_obj().obj = nullptr;
_get_obj().id = ObjectID();
break;
@@ -1301,11 +1301,11 @@ void Variant::_clear_internal() {
reinterpret_cast<NodePath *>(_data._mem)->~NodePath();
} break;
case OBJECT: {
- if (_get_obj().id.is_reference()) {
+ if (_get_obj().id.is_ref_counted()) {
//we are safe that there is a reference here
- Reference *reference = static_cast<Reference *>(_get_obj().obj);
- if (reference->unreference()) {
- memdelete(reference);
+ RefCounted *ref_counted = static_cast<RefCounted *>(_get_obj().obj);
+ if (ref_counted->unreference()) {
+ memdelete(ref_counted);
}
}
_get_obj().obj = nullptr;
@@ -1830,7 +1830,7 @@ String Variant::stringify(List<const void *> &stack) const {
} break;
case OBJECT: {
if (_get_obj().obj) {
- if (!_get_obj().id.is_reference() && ObjectDB::get_instance(_get_obj().id) == nullptr) {
+ if (!_get_obj().id.is_ref_counted() && ObjectDB::get_instance(_get_obj().id) == nullptr) {
return "[Freed Object]";
}
@@ -2530,9 +2530,9 @@ Variant::Variant(const Object *p_object) {
memnew_placement(_data._mem, ObjData);
if (p_object) {
- if (p_object->is_reference()) {
- Reference *reference = const_cast<Reference *>(static_cast<const Reference *>(p_object));
- if (!reference->init_ref()) {
+ if (p_object->is_ref_counted()) {
+ RefCounted *ref_counted = const_cast<RefCounted *>(static_cast<const RefCounted *>(p_object));
+ if (!ref_counted->init_ref()) {
_get_obj().obj = nullptr;
_get_obj().id = ObjectID();
return;
@@ -2756,17 +2756,17 @@ void Variant::operator=(const Variant &p_variant) {
*reinterpret_cast<::RID *>(_data._mem) = *reinterpret_cast<const ::RID *>(p_variant._data._mem);
} break;
case OBJECT: {
- if (_get_obj().id.is_reference()) {
+ if (_get_obj().id.is_ref_counted()) {
//we are safe that there is a reference here
- Reference *reference = static_cast<Reference *>(_get_obj().obj);
- if (reference->unreference()) {
- memdelete(reference);
+ RefCounted *ref_counted = static_cast<RefCounted *>(_get_obj().obj);
+ if (ref_counted->unreference()) {
+ memdelete(ref_counted);
}
}
- if (p_variant._get_obj().obj && p_variant._get_obj().id.is_reference()) {
- Reference *reference = static_cast<Reference *>(p_variant._get_obj().obj);
- if (!reference->reference()) {
+ if (p_variant._get_obj().obj && p_variant._get_obj().id.is_ref_counted()) {
+ RefCounted *ref_counted = static_cast<RefCounted *>(p_variant._get_obj().obj);
+ if (!ref_counted->reference()) {
_get_obj().obj = nullptr;
_get_obj().id = ObjectID();
break;
@@ -3323,7 +3323,7 @@ bool Variant::hash_compare(const Variant &p_variant) const {
}
bool Variant::is_ref() const {
- return type == OBJECT && _get_obj().id.is_reference();
+ return type == OBJECT && _get_obj().id.is_ref_counted();
}
Vector<Variant> varray() {
diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp
index 02a59f7685..05ed35c760 100644
--- a/core/variant/variant_call.cpp
+++ b/core/variant/variant_call.cpp
@@ -972,7 +972,7 @@ void Variant::call(const StringName &p_method, const Variant **p_args, int p_arg
return;
}
#ifdef DEBUG_ENABLED
- if (EngineDebugger::is_active() && !_get_obj().id.is_reference() && ObjectDB::get_instance(_get_obj().id) == nullptr) {
+ if (EngineDebugger::is_active() && !_get_obj().id.is_ref_counted() && ObjectDB::get_instance(_get_obj().id) == nullptr) {
r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL;
return;
}
diff --git a/core/variant/variant_construct.cpp b/core/variant/variant_construct.cpp
index f66f33ef93..9e3ab5897b 100644
--- a/core/variant/variant_construct.cpp
+++ b/core/variant/variant_construct.cpp
@@ -836,9 +836,9 @@ String Variant::get_constructor_argument_name(Variant::Type p_type, int p_constr
void VariantInternal::object_assign(Variant *v, const Object *o) {
if (o) {
- if (o->is_reference()) {
- Reference *reference = const_cast<Reference *>(static_cast<const Reference *>(o));
- if (!reference->init_ref()) {
+ if (o->is_ref_counted()) {
+ RefCounted *ref_counted = const_cast<RefCounted *>(static_cast<const RefCounted *>(o));
+ if (!ref_counted->init_ref()) {
v->_get_obj().obj = nullptr;
v->_get_obj().id = ObjectID();
return;
diff --git a/core/variant/variant_internal.h b/core/variant/variant_internal.h
index 9e5811a082..78e1ad06ae 100644
--- a/core/variant/variant_internal.h
+++ b/core/variant/variant_internal.h
@@ -285,7 +285,7 @@ public:
v->clear();
}
- static void object_assign(Variant *v, const Object *o); // Needs Reference, so it's implemented elsewhere.
+ static void object_assign(Variant *v, const Object *o); // Needs RefCounted, so it's implemented elsewhere.
_FORCE_INLINE_ static void object_assign(Variant *v, const Variant *o) {
object_assign(v, o->_get_obj().obj);
diff --git a/core/variant/variant_parser.cpp b/core/variant/variant_parser.cpp
index 21c0d40fa5..12b5aa6590 100644
--- a/core/variant/variant_parser.cpp
+++ b/core/variant/variant_parser.cpp
@@ -742,7 +742,7 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
return ERR_PARSE_ERROR;
}
- REF ref = REF(Object::cast_to<Reference>(obj));
+ REF ref = REF(Object::cast_to<RefCounted>(obj));
get_token(p_stream, token, line, r_err_str);
if (token.type != TK_COMMA) {
diff --git a/core/variant/variant_setget.cpp b/core/variant/variant_setget.cpp
index 4f4a80e807..ae2795f2fd 100644
--- a/core/variant/variant_setget.cpp
+++ b/core/variant/variant_setget.cpp
@@ -1453,7 +1453,7 @@ bool Variant::iter_init(Variant &r_iter, bool &valid) const {
#ifdef DEBUG_ENABLED
- if (EngineDebugger::is_active() && !_get_obj().id.is_reference() && ObjectDB::get_instance(_get_obj().id) == nullptr) {
+ if (EngineDebugger::is_active() && !_get_obj().id.is_ref_counted() && ObjectDB::get_instance(_get_obj().id) == nullptr) {
valid = false;
return false;
}
@@ -1680,7 +1680,7 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const {
#ifdef DEBUG_ENABLED
- if (EngineDebugger::is_active() && !_get_obj().id.is_reference() && ObjectDB::get_instance(_get_obj().id) == nullptr) {
+ if (EngineDebugger::is_active() && !_get_obj().id.is_ref_counted() && ObjectDB::get_instance(_get_obj().id) == nullptr) {
valid = false;
return false;
}
@@ -1865,7 +1865,7 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const {
return Variant();
}
#ifdef DEBUG_ENABLED
- if (EngineDebugger::is_active() && !_get_obj().id.is_reference() && ObjectDB::get_instance(_get_obj().id) == nullptr) {
+ if (EngineDebugger::is_active() && !_get_obj().id.is_ref_counted() && ObjectDB::get_instance(_get_obj().id) == nullptr) {
r_valid = false;
return Variant();
}
diff --git a/core/variant/variant_utility.cpp b/core/variant/variant_utility.cpp
index 553f2b23a2..5d1efb4166 100644
--- a/core/variant/variant_utility.cpp
+++ b/core/variant/variant_utility.cpp
@@ -32,7 +32,7 @@
#include "core/core_string_names.h"
#include "core/io/marshalls.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/os/os.h"
#include "core/templates/oa_hash_map.h"
#include "core/variant/binder_common.h"
diff --git a/doc/classes/AESContext.xml b/doc/classes/AESContext.xml
index f577bab992..9dde25028e 100644
--- a/doc/classes/AESContext.xml
+++ b/doc/classes/AESContext.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AESContext" inherits="Reference" version="4.0">
+<class name="AESContext" inherits="RefCounted" version="4.0">
<brief_description>
Interface to low level AES encryption features.
</brief_description>
diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml
index fce2b90197..cc7f7072b9 100644
--- a/doc/classes/AStar.xml
+++ b/doc/classes/AStar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AStar" inherits="Reference" version="4.0">
+<class name="AStar" inherits="RefCounted" version="4.0">
<brief_description>
An implementation of A* to find the shortest paths among connected points in space.
</brief_description>
diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml
index 3efd2f604c..9edc300169 100644
--- a/doc/classes/AStar2D.xml
+++ b/doc/classes/AStar2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AStar2D" inherits="Reference" version="4.0">
+<class name="AStar2D" inherits="RefCounted" version="4.0">
<brief_description>
AStar class representation that uses 2D vectors as edges.
</brief_description>
diff --git a/doc/classes/AnimationTrackEditPlugin.xml b/doc/classes/AnimationTrackEditPlugin.xml
index 8490d48718..7b96808581 100644
--- a/doc/classes/AnimationTrackEditPlugin.xml
+++ b/doc/classes/AnimationTrackEditPlugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationTrackEditPlugin" inherits="Reference" version="4.0">
+<class name="AnimationTrackEditPlugin" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AudioEffectInstance.xml b/doc/classes/AudioEffectInstance.xml
index dc76880a36..9ab6028901 100644
--- a/doc/classes/AudioEffectInstance.xml
+++ b/doc/classes/AudioEffectInstance.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectInstance" inherits="Reference" version="4.0">
+<class name="AudioEffectInstance" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AudioStreamPlayback.xml b/doc/classes/AudioStreamPlayback.xml
index da75ff206c..cb01aa75e8 100644
--- a/doc/classes/AudioStreamPlayback.xml
+++ b/doc/classes/AudioStreamPlayback.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamPlayback" inherits="Reference" version="4.0">
+<class name="AudioStreamPlayback" inherits="RefCounted" version="4.0">
<brief_description>
Meta class for playing back audio.
</brief_description>
diff --git a/doc/classes/CameraFeed.xml b/doc/classes/CameraFeed.xml
index 4fc124592f..fc7dcd3772 100644
--- a/doc/classes/CameraFeed.xml
+++ b/doc/classes/CameraFeed.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CameraFeed" inherits="Reference" version="4.0">
+<class name="CameraFeed" inherits="RefCounted" version="4.0">
<brief_description>
A camera feed gives you access to a single physical camera attached to your device.
</brief_description>
diff --git a/doc/classes/CharFXTransform.xml b/doc/classes/CharFXTransform.xml
index 7b57dc05f8..7a6a18f532 100644
--- a/doc/classes/CharFXTransform.xml
+++ b/doc/classes/CharFXTransform.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CharFXTransform" inherits="Reference" version="4.0">
+<class name="CharFXTransform" inherits="RefCounted" version="4.0">
<brief_description>
Controls how an individual character will be displayed in a [RichTextEffect].
</brief_description>
diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml
index 38948a2d6e..8b903d8dbc 100644
--- a/doc/classes/ConfigFile.xml
+++ b/doc/classes/ConfigFile.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConfigFile" inherits="Reference" version="4.0">
+<class name="ConfigFile" inherits="RefCounted" version="4.0">
<brief_description>
Helper class to handle INI-style files.
</brief_description>
diff --git a/doc/classes/Crypto.xml b/doc/classes/Crypto.xml
index 1f6cb40cde..deda6116f4 100644
--- a/doc/classes/Crypto.xml
+++ b/doc/classes/Crypto.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Crypto" inherits="Reference" version="4.0">
+<class name="Crypto" inherits="RefCounted" version="4.0">
<brief_description>
Access to advanced cryptographic functionalities.
</brief_description>
diff --git a/doc/classes/DTLSServer.xml b/doc/classes/DTLSServer.xml
index 91a04b1f28..28d68d309f 100644
--- a/doc/classes/DTLSServer.xml
+++ b/doc/classes/DTLSServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="DTLSServer" inherits="Reference" version="4.0">
+<class name="DTLSServer" inherits="RefCounted" version="4.0">
<brief_description>
Helper class to implement a DTLS server.
</brief_description>
diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml
index 2c61d723cd..dae8d83f0c 100644
--- a/doc/classes/Directory.xml
+++ b/doc/classes/Directory.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Directory" inherits="Reference" version="4.0">
+<class name="Directory" inherits="RefCounted" version="4.0">
<brief_description>
Type used to handle the filesystem.
</brief_description>
diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml
index b29734de1c..d9e3003fbb 100644
--- a/doc/classes/EditorExportPlugin.xml
+++ b/doc/classes/EditorExportPlugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorExportPlugin" inherits="Reference" version="4.0">
+<class name="EditorExportPlugin" inherits="RefCounted" version="4.0">
<brief_description>
A script that is executed when exporting the project.
</brief_description>
diff --git a/doc/classes/EditorFeatureProfile.xml b/doc/classes/EditorFeatureProfile.xml
index e05a685dd7..0cd839f370 100644
--- a/doc/classes/EditorFeatureProfile.xml
+++ b/doc/classes/EditorFeatureProfile.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorFeatureProfile" inherits="Reference" version="4.0">
+<class name="EditorFeatureProfile" inherits="RefCounted" version="4.0">
<brief_description>
An editor feature profile which can be used to disable specific features.
</brief_description>
diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml
index 8204dc931e..b092a53676 100644
--- a/doc/classes/EditorInspectorPlugin.xml
+++ b/doc/classes/EditorInspectorPlugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorInspectorPlugin" inherits="Reference" version="4.0">
+<class name="EditorInspectorPlugin" inherits="RefCounted" version="4.0">
<brief_description>
Plugin for adding custom property editors on inspector.
</brief_description>
diff --git a/doc/classes/EditorResourceConversionPlugin.xml b/doc/classes/EditorResourceConversionPlugin.xml
index 1976eb802c..1d7e98c99d 100644
--- a/doc/classes/EditorResourceConversionPlugin.xml
+++ b/doc/classes/EditorResourceConversionPlugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorResourceConversionPlugin" inherits="Reference" version="4.0">
+<class name="EditorResourceConversionPlugin" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/EditorResourcePreviewGenerator.xml b/doc/classes/EditorResourcePreviewGenerator.xml
index e935bf19fc..c191c9db12 100644
--- a/doc/classes/EditorResourcePreviewGenerator.xml
+++ b/doc/classes/EditorResourcePreviewGenerator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorResourcePreviewGenerator" inherits="Reference" version="4.0">
+<class name="EditorResourcePreviewGenerator" inherits="RefCounted" version="4.0">
<brief_description>
Custom generator of previews.
</brief_description>
diff --git a/doc/classes/EditorSceneImporter.xml b/doc/classes/EditorSceneImporter.xml
index aa55a1653d..8df3091057 100644
--- a/doc/classes/EditorSceneImporter.xml
+++ b/doc/classes/EditorSceneImporter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSceneImporter" inherits="Reference" version="4.0">
+<class name="EditorSceneImporter" inherits="RefCounted" version="4.0">
<brief_description>
Imports scenes from third-parties' 3D files.
</brief_description>
diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml
index d1cdc4e43e..789366c2a4 100644
--- a/doc/classes/EditorScenePostImport.xml
+++ b/doc/classes/EditorScenePostImport.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorScenePostImport" inherits="Reference" version="4.0">
+<class name="EditorScenePostImport" inherits="RefCounted" version="4.0">
<brief_description>
Post-processes scenes after import.
</brief_description>
diff --git a/doc/classes/EditorScript.xml b/doc/classes/EditorScript.xml
index 60ccf451b8..a91ea0eb14 100644
--- a/doc/classes/EditorScript.xml
+++ b/doc/classes/EditorScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorScript" inherits="Reference" version="4.0">
+<class name="EditorScript" inherits="RefCounted" version="4.0">
<brief_description>
Base script that can be used to add extension functions to the editor.
</brief_description>
diff --git a/doc/classes/EditorTranslationParserPlugin.xml b/doc/classes/EditorTranslationParserPlugin.xml
index c97459d9dc..349d2ec934 100644
--- a/doc/classes/EditorTranslationParserPlugin.xml
+++ b/doc/classes/EditorTranslationParserPlugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorTranslationParserPlugin" inherits="Reference" version="4.0">
+<class name="EditorTranslationParserPlugin" inherits="RefCounted" version="4.0">
<brief_description>
Plugin for adding custom parsers to extract strings that are to be translated from custom files (.csv, .json etc.).
</brief_description>
diff --git a/doc/classes/EncodedObjectAsID.xml b/doc/classes/EncodedObjectAsID.xml
index 1e4fde453b..e3e36590a3 100644
--- a/doc/classes/EncodedObjectAsID.xml
+++ b/doc/classes/EncodedObjectAsID.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EncodedObjectAsID" inherits="Reference" version="4.0">
+<class name="EncodedObjectAsID" inherits="RefCounted" version="4.0">
<brief_description>
Holds a reference to an [Object]'s instance ID.
</brief_description>
diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml
index d777c6fd9d..e41de4c4ed 100644
--- a/doc/classes/Expression.xml
+++ b/doc/classes/Expression.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Expression" inherits="Reference" version="4.0">
+<class name="Expression" inherits="RefCounted" version="4.0">
<brief_description>
A class that stores an expression you can execute.
</brief_description>
diff --git a/doc/classes/File.xml b/doc/classes/File.xml
index ea3b82dc54..8002f7dcb9 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/File.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="File" inherits="Reference" version="4.0">
+<class name="File" inherits="RefCounted" version="4.0">
<brief_description>
Type to handle file reading and writing operations.
</brief_description>
diff --git a/doc/classes/HMACContext.xml b/doc/classes/HMACContext.xml
index 00d528ef8f..9fa96e5ddf 100644
--- a/doc/classes/HMACContext.xml
+++ b/doc/classes/HMACContext.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HMACContext" inherits="Reference" version="4.0">
+<class name="HMACContext" inherits="RefCounted" version="4.0">
<brief_description>
Used to create an HMAC for a message using a key.
</brief_description>
diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml
index ddfcdf7724..a549994a69 100644
--- a/doc/classes/HTTPClient.xml
+++ b/doc/classes/HTTPClient.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HTTPClient" inherits="Reference" version="4.0">
+<class name="HTTPClient" inherits="RefCounted" version="4.0">
<brief_description>
Low-level hyper-text transfer protocol client.
</brief_description>
diff --git a/doc/classes/HashingContext.xml b/doc/classes/HashingContext.xml
index e020293d76..1c7b7ca937 100644
--- a/doc/classes/HashingContext.xml
+++ b/doc/classes/HashingContext.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HashingContext" inherits="Reference" version="4.0">
+<class name="HashingContext" inherits="RefCounted" version="4.0">
<brief_description>
Context to compute cryptographic hashes over multiple iterations.
</brief_description>
diff --git a/doc/classes/JSONParseResult.xml b/doc/classes/JSONParseResult.xml
index bc94f74b07..7311343b68 100644
--- a/doc/classes/JSONParseResult.xml
+++ b/doc/classes/JSONParseResult.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JSONParseResult" inherits="Reference" version="4.0">
+<class name="JSONParseResult" inherits="RefCounted" version="4.0">
<brief_description>
Data class wrapper for decoded JSON.
</brief_description>
diff --git a/doc/classes/JSONParser.xml b/doc/classes/JSONParser.xml
index 31ba295418..991629f255 100644
--- a/doc/classes/JSONParser.xml
+++ b/doc/classes/JSONParser.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JSONParser" inherits="Reference" version="4.0">
+<class name="JSONParser" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/JavaClass.xml b/doc/classes/JavaClass.xml
index 69b7a9b718..0b6a44fe14 100644
--- a/doc/classes/JavaClass.xml
+++ b/doc/classes/JavaClass.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JavaClass" inherits="Reference" version="4.0">
+<class name="JavaClass" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/JavaScriptObject.xml b/doc/classes/JavaScriptObject.xml
index a9e9c77e89..087fe163b4 100644
--- a/doc/classes/JavaScriptObject.xml
+++ b/doc/classes/JavaScriptObject.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JavaScriptObject" inherits="Reference" version="4.0">
+<class name="JavaScriptObject" inherits="RefCounted" version="4.0">
<brief_description>
A wrapper class for native JavaScript objects.
</brief_description>
diff --git a/doc/classes/KinematicCollision2D.xml b/doc/classes/KinematicCollision2D.xml
index 8748f89618..5480d7d55f 100644
--- a/doc/classes/KinematicCollision2D.xml
+++ b/doc/classes/KinematicCollision2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="KinematicCollision2D" inherits="Reference" version="4.0">
+<class name="KinematicCollision2D" inherits="RefCounted" version="4.0">
<brief_description>
Collision data for [method PhysicsBody2D.move_and_collide] collisions.
</brief_description>
diff --git a/doc/classes/KinematicCollision3D.xml b/doc/classes/KinematicCollision3D.xml
index 8eac15ebf4..329efab474 100644
--- a/doc/classes/KinematicCollision3D.xml
+++ b/doc/classes/KinematicCollision3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="KinematicCollision3D" inherits="Reference" version="4.0">
+<class name="KinematicCollision3D" inherits="RefCounted" version="4.0">
<brief_description>
Collision data for [method PhysicsBody3D.move_and_collide] collisions.
</brief_description>
diff --git a/doc/classes/Lightmapper.xml b/doc/classes/Lightmapper.xml
index e80194858a..79fae42d68 100644
--- a/doc/classes/Lightmapper.xml
+++ b/doc/classes/Lightmapper.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Lightmapper" inherits="Reference" version="4.0">
+<class name="Lightmapper" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml
index 3c679047a0..da02511dc0 100644
--- a/doc/classes/MeshDataTool.xml
+++ b/doc/classes/MeshDataTool.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MeshDataTool" inherits="Reference" version="4.0">
+<class name="MeshDataTool" inherits="RefCounted" version="4.0">
<brief_description>
Helper tool to access and edit [Mesh] data.
</brief_description>
diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml
index b2be92dbbd..5de5703d95 100644
--- a/doc/classes/MultiplayerAPI.xml
+++ b/doc/classes/MultiplayerAPI.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MultiplayerAPI" inherits="Reference" version="4.0">
+<class name="MultiplayerAPI" inherits="RefCounted" version="4.0">
<brief_description>
High-level multiplayer API.
</brief_description>
diff --git a/doc/classes/Mutex.xml b/doc/classes/Mutex.xml
index f5f6308401..dfda614f8e 100644
--- a/doc/classes/Mutex.xml
+++ b/doc/classes/Mutex.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Mutex" inherits="Reference" version="4.0">
+<class name="Mutex" inherits="RefCounted" version="4.0">
<brief_description>
A synchronization mutex (mutual exclusion).
</brief_description>
diff --git a/doc/classes/Node3DGizmo.xml b/doc/classes/Node3DGizmo.xml
index 55080614fc..c561047332 100644
--- a/doc/classes/Node3DGizmo.xml
+++ b/doc/classes/Node3DGizmo.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Node3DGizmo" inherits="Reference" version="4.0">
+<class name="Node3DGizmo" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index 7da9c1ac38..f5dcd6bcdc 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -7,7 +7,7 @@
Every class which is not a built-in type inherits from this class.
You can construct Objects from scripting languages, using [code]Object.new()[/code] in GDScript, [code]new Object[/code] in C#, or the "Construct Object" node in VisualScript.
Objects do not manage memory. If a class inherits from Object, you will have to delete instances of it manually. To do so, call the [method free] method from your script or delete the instance from C++.
- Some classes that extend Object add memory management. This is the case of [Reference], which counts references and deletes itself automatically when no longer referenced. [Node], another fundamental type, deletes all its children when freed from memory.
+ Some classes that extend Object add memory management. This is the case of [RefCounted], which counts references and deletes itself automatically when no longer referenced. [Node], another fundamental type, deletes all its children when freed from memory.
Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in [method _get_property_list] and handled in [method _get] and [method _set]. However, scripting languages and C++ have simpler means to export them.
Property membership can be tested directly in GDScript using [code]in[/code]:
[codeblocks]
@@ -26,7 +26,7 @@
[/codeblocks]
The [code]in[/code] operator will evaluate to [code]true[/code] as long as the key exists, even if the value is [code]null[/code].
Objects also receive notifications. Notifications are a simple way to notify the object about different events, so they can all be handled together. See [method _notification].
- [b]Note:[/b] Unlike references to a [Reference], references to an Object stored in a variable can become invalid without warning. Therefore, it's recommended to use [Reference] for data classes instead of [Object].
+ [b]Note:[/b] Unlike references to a [RefCounted], references to an Object stored in a variable can become invalid without warning. Therefore, it's recommended to use [RefCounted] for data classes instead of [Object].
</description>
<tutorials>
<link title="When and how to avoid using nodes for everything">https://docs.godotengine.org/en/latest/getting_started/workflow/best_practices/node_alternatives.html</link>
diff --git a/doc/classes/PCKPacker.xml b/doc/classes/PCKPacker.xml
index e3c78e08f1..40e8683c93 100644
--- a/doc/classes/PCKPacker.xml
+++ b/doc/classes/PCKPacker.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PCKPacker" inherits="Reference" version="4.0">
+<class name="PCKPacker" inherits="RefCounted" version="4.0">
<brief_description>
Creates packages that can be loaded into a running project.
</brief_description>
diff --git a/doc/classes/PackedDataContainerRef.xml b/doc/classes/PackedDataContainerRef.xml
index f0f59675de..bfd5a6f1c1 100644
--- a/doc/classes/PackedDataContainerRef.xml
+++ b/doc/classes/PackedDataContainerRef.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PackedDataContainerRef" inherits="Reference" version="4.0">
+<class name="PackedDataContainerRef" inherits="RefCounted" version="4.0">
<brief_description>
- Reference version of [PackedDataContainer].
+ Reference-counted version of [PackedDataContainer].
</brief_description>
<description>
</description>
diff --git a/doc/classes/PacketPeer.xml b/doc/classes/PacketPeer.xml
index e3e2f63e14..0a758c2cd6 100644
--- a/doc/classes/PacketPeer.xml
+++ b/doc/classes/PacketPeer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PacketPeer" inherits="Reference" version="4.0">
+<class name="PacketPeer" inherits="RefCounted" version="4.0">
<brief_description>
Abstraction and base class for packet-based protocols.
</brief_description>
diff --git a/doc/classes/PhysicsShapeQueryParameters2D.xml b/doc/classes/PhysicsShapeQueryParameters2D.xml
index 4d7fc61517..92bd9b136a 100644
--- a/doc/classes/PhysicsShapeQueryParameters2D.xml
+++ b/doc/classes/PhysicsShapeQueryParameters2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsShapeQueryParameters2D" inherits="Reference" version="4.0">
+<class name="PhysicsShapeQueryParameters2D" inherits="RefCounted" version="4.0">
<brief_description>
Parameters to be sent to a 2D shape physics query.
</brief_description>
diff --git a/doc/classes/PhysicsShapeQueryParameters3D.xml b/doc/classes/PhysicsShapeQueryParameters3D.xml
index 79bc29057f..087c52a650 100644
--- a/doc/classes/PhysicsShapeQueryParameters3D.xml
+++ b/doc/classes/PhysicsShapeQueryParameters3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsShapeQueryParameters3D" inherits="Reference" version="4.0">
+<class name="PhysicsShapeQueryParameters3D" inherits="RefCounted" version="4.0">
<brief_description>
Parameters to be sent to a 3D shape physics query.
</brief_description>
diff --git a/doc/classes/PhysicsShapeQueryResult2D.xml b/doc/classes/PhysicsShapeQueryResult2D.xml
index 227683cc33..07b7bc90e2 100644
--- a/doc/classes/PhysicsShapeQueryResult2D.xml
+++ b/doc/classes/PhysicsShapeQueryResult2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsShapeQueryResult2D" inherits="Reference" version="4.0">
+<class name="PhysicsShapeQueryResult2D" inherits="RefCounted" version="4.0">
<brief_description>
Result of a 2D shape query in [PhysicsServer2D].
</brief_description>
diff --git a/doc/classes/PhysicsShapeQueryResult3D.xml b/doc/classes/PhysicsShapeQueryResult3D.xml
index 4555c4e242..d0ca227a68 100644
--- a/doc/classes/PhysicsShapeQueryResult3D.xml
+++ b/doc/classes/PhysicsShapeQueryResult3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsShapeQueryResult3D" inherits="Reference" version="4.0">
+<class name="PhysicsShapeQueryResult3D" inherits="RefCounted" version="4.0">
<brief_description>
Result of a 3D shape query in [PhysicsServer3D].
</brief_description>
diff --git a/doc/classes/PhysicsTestMotionResult2D.xml b/doc/classes/PhysicsTestMotionResult2D.xml
index 301cff2885..2744aa17a1 100644
--- a/doc/classes/PhysicsTestMotionResult2D.xml
+++ b/doc/classes/PhysicsTestMotionResult2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsTestMotionResult2D" inherits="Reference" version="4.0">
+<class name="PhysicsTestMotionResult2D" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDAttachmentFormat.xml b/doc/classes/RDAttachmentFormat.xml
index 4ee7b9b28e..b73377bf77 100644
--- a/doc/classes/RDAttachmentFormat.xml
+++ b/doc/classes/RDAttachmentFormat.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDAttachmentFormat" inherits="Reference" version="4.0">
+<class name="RDAttachmentFormat" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDPipelineColorBlendState.xml b/doc/classes/RDPipelineColorBlendState.xml
index adc6f1f6a3..1424a0d653 100644
--- a/doc/classes/RDPipelineColorBlendState.xml
+++ b/doc/classes/RDPipelineColorBlendState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDPipelineColorBlendState" inherits="Reference" version="4.0">
+<class name="RDPipelineColorBlendState" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDPipelineColorBlendStateAttachment.xml b/doc/classes/RDPipelineColorBlendStateAttachment.xml
index 7f118b5f0b..a6a1900cb5 100644
--- a/doc/classes/RDPipelineColorBlendStateAttachment.xml
+++ b/doc/classes/RDPipelineColorBlendStateAttachment.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDPipelineColorBlendStateAttachment" inherits="Reference" version="4.0">
+<class name="RDPipelineColorBlendStateAttachment" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDPipelineDepthStencilState.xml b/doc/classes/RDPipelineDepthStencilState.xml
index 562ff52819..76e0506bca 100644
--- a/doc/classes/RDPipelineDepthStencilState.xml
+++ b/doc/classes/RDPipelineDepthStencilState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDPipelineDepthStencilState" inherits="Reference" version="4.0">
+<class name="RDPipelineDepthStencilState" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDPipelineMultisampleState.xml b/doc/classes/RDPipelineMultisampleState.xml
index 4658c7d9ba..8c90f02301 100644
--- a/doc/classes/RDPipelineMultisampleState.xml
+++ b/doc/classes/RDPipelineMultisampleState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDPipelineMultisampleState" inherits="Reference" version="4.0">
+<class name="RDPipelineMultisampleState" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDPipelineRasterizationState.xml b/doc/classes/RDPipelineRasterizationState.xml
index 5064dd6deb..3f8c50cf42 100644
--- a/doc/classes/RDPipelineRasterizationState.xml
+++ b/doc/classes/RDPipelineRasterizationState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDPipelineRasterizationState" inherits="Reference" version="4.0">
+<class name="RDPipelineRasterizationState" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDSamplerState.xml b/doc/classes/RDSamplerState.xml
index ab31960b7c..9a9d55948c 100644
--- a/doc/classes/RDSamplerState.xml
+++ b/doc/classes/RDSamplerState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDSamplerState" inherits="Reference" version="4.0">
+<class name="RDSamplerState" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDShaderSource.xml b/doc/classes/RDShaderSource.xml
index c1cfd34bb7..68fc43d8ef 100644
--- a/doc/classes/RDShaderSource.xml
+++ b/doc/classes/RDShaderSource.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDShaderSource" inherits="Reference" version="4.0">
+<class name="RDShaderSource" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDTextureFormat.xml b/doc/classes/RDTextureFormat.xml
index e41ddff368..ccfa6d1b95 100644
--- a/doc/classes/RDTextureFormat.xml
+++ b/doc/classes/RDTextureFormat.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDTextureFormat" inherits="Reference" version="4.0">
+<class name="RDTextureFormat" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDTextureView.xml b/doc/classes/RDTextureView.xml
index 73b2a7ae4a..db140ae775 100644
--- a/doc/classes/RDTextureView.xml
+++ b/doc/classes/RDTextureView.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDTextureView" inherits="Reference" version="4.0">
+<class name="RDTextureView" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDUniform.xml b/doc/classes/RDUniform.xml
index bc8a21e985..666935d663 100644
--- a/doc/classes/RDUniform.xml
+++ b/doc/classes/RDUniform.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDUniform" inherits="Reference" version="4.0">
+<class name="RDUniform" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RDVertexAttribute.xml b/doc/classes/RDVertexAttribute.xml
index 56fe40b51d..3499918cc8 100644
--- a/doc/classes/RDVertexAttribute.xml
+++ b/doc/classes/RDVertexAttribute.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RDVertexAttribute" inherits="Reference" version="4.0">
+<class name="RDVertexAttribute" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RandomNumberGenerator.xml b/doc/classes/RandomNumberGenerator.xml
index 6312cd18aa..6fcb79b5fe 100644
--- a/doc/classes/RandomNumberGenerator.xml
+++ b/doc/classes/RandomNumberGenerator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RandomNumberGenerator" inherits="Reference" version="4.0">
+<class name="RandomNumberGenerator" inherits="RefCounted" version="4.0">
<brief_description>
A class for generating pseudo-random numbers.
</brief_description>
diff --git a/doc/classes/Reference.xml b/doc/classes/RefCounted.xml
index 724d2db924..cf96514203 100644
--- a/doc/classes/Reference.xml
+++ b/doc/classes/RefCounted.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Reference" inherits="Object" version="4.0">
+<class name="RefCounted" inherits="Object" version="4.0">
<brief_description>
Base class for reference-counted objects.
</brief_description>
<description>
Base class for any object that keeps a reference count. [Resource] and many other helper objects inherit this class.
Unlike other [Object] types, References keep an internal reference counter so that they are automatically released when no longer in use, and only then. References therefore do not need to be freed manually with [method Object.free].
- In the vast majority of use cases, instantiating and using [Reference]-derived types is all you need to do. The methods provided in this class are only for advanced users, and can cause issues if misused.
+ In the vast majority of use cases, instantiating and using [RefCounted]-derived types is all you need to do. The methods provided in this class are only for advanced users, and can cause issues if misused.
[b]Note:[/b] In C#, references will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free references that are no longer in use. This means that unused references will linger on for a while before being removed.
</description>
<tutorials>
diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml
index 75736798fd..6edb3b1a11 100644
--- a/doc/classes/Resource.xml
+++ b/doc/classes/Resource.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Resource" inherits="Reference" version="4.0">
+<class name="Resource" inherits="RefCounted" version="4.0">
<brief_description>
Base class for all resources.
</brief_description>
<description>
- Resource is the base class for all Godot-specific resource types, serving primarily as data containers. Since they inherit from [Reference], resources are reference-counted and freed when no longer in use. They are also cached once loaded from disk, so that any further attempts to load a resource from a given path will return the same reference (all this in contrast to a [Node], which is not reference-counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource.
+ Resource is the base class for all Godot-specific resource types, serving primarily as data containers. Since they inherit from [RefCounted], resources are reference-counted and freed when no longer in use. They are also cached once loaded from disk, so that any further attempts to load a resource from a given path will return the same reference (all this in contrast to a [Node], which is not reference-counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource.
[b]Note:[/b] In C#, resources will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free resources that are no longer in use. This means that unused resources will linger on for a while before being removed.
</description>
<tutorials>
diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml
index 9943f644cf..aed194095b 100644
--- a/doc/classes/ResourceFormatLoader.xml
+++ b/doc/classes/ResourceFormatLoader.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatLoader" inherits="Reference" version="4.0">
+<class name="ResourceFormatLoader" inherits="RefCounted" version="4.0">
<brief_description>
Loads a specific resource type from a file.
</brief_description>
diff --git a/doc/classes/ResourceFormatSaver.xml b/doc/classes/ResourceFormatSaver.xml
index 69f8b43898..edbf8d73f8 100644
--- a/doc/classes/ResourceFormatSaver.xml
+++ b/doc/classes/ResourceFormatSaver.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatSaver" inherits="Reference" version="4.0">
+<class name="ResourceFormatSaver" inherits="RefCounted" version="4.0">
<brief_description>
Saves a specific resource type to a file.
</brief_description>
diff --git a/doc/classes/ResourceImporter.xml b/doc/classes/ResourceImporter.xml
index 0475d2c94d..59900b1b73 100644
--- a/doc/classes/ResourceImporter.xml
+++ b/doc/classes/ResourceImporter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceImporter" inherits="Reference" version="4.0">
+<class name="ResourceImporter" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/SceneState.xml b/doc/classes/SceneState.xml
index abc429d5fe..f9e0ef76b9 100644
--- a/doc/classes/SceneState.xml
+++ b/doc/classes/SceneState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SceneState" inherits="Reference" version="4.0">
+<class name="SceneState" inherits="RefCounted" version="4.0">
<brief_description>
A script interface to a scene file's data.
</brief_description>
diff --git a/doc/classes/SceneTreeTimer.xml b/doc/classes/SceneTreeTimer.xml
index b223bf6821..4eef754345 100644
--- a/doc/classes/SceneTreeTimer.xml
+++ b/doc/classes/SceneTreeTimer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SceneTreeTimer" inherits="Reference" version="4.0">
+<class name="SceneTreeTimer" inherits="RefCounted" version="4.0">
<brief_description>
One-shot timer.
</brief_description>
diff --git a/doc/classes/Semaphore.xml b/doc/classes/Semaphore.xml
index f311e1c72f..e8b405e52a 100644
--- a/doc/classes/Semaphore.xml
+++ b/doc/classes/Semaphore.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Semaphore" inherits="Reference" version="4.0">
+<class name="Semaphore" inherits="RefCounted" version="4.0">
<brief_description>
A synchronization semaphore.
</brief_description>
diff --git a/doc/classes/SkinReference.xml b/doc/classes/SkinReference.xml
index 8fc163f88d..3f8bc3be82 100644
--- a/doc/classes/SkinReference.xml
+++ b/doc/classes/SkinReference.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkinReference" inherits="Reference" version="4.0">
+<class name="SkinReference" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml
index f120103916..5367a572f1 100644
--- a/doc/classes/StreamPeer.xml
+++ b/doc/classes/StreamPeer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamPeer" inherits="Reference" version="4.0">
+<class name="StreamPeer" inherits="RefCounted" version="4.0">
<brief_description>
Abstraction and base class for stream-based protocols.
</brief_description>
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index d434f5c2c9..56b47f4a24 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SurfaceTool" inherits="Reference" version="4.0">
+<class name="SurfaceTool" inherits="RefCounted" version="4.0">
<brief_description>
Helper tool to create geometry.
</brief_description>
diff --git a/doc/classes/TCPServer.xml b/doc/classes/TCPServer.xml
index 28f06ad3ae..7160055c6d 100644
--- a/doc/classes/TCPServer.xml
+++ b/doc/classes/TCPServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TCPServer" inherits="Reference" version="4.0">
+<class name="TCPServer" inherits="RefCounted" version="4.0">
<brief_description>
A TCP server.
</brief_description>
diff --git a/doc/classes/TextLine.xml b/doc/classes/TextLine.xml
index c21da09edb..ddbae0e977 100644
--- a/doc/classes/TextLine.xml
+++ b/doc/classes/TextLine.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextLine" inherits="Reference" version="4.0">
+<class name="TextLine" inherits="RefCounted" version="4.0">
<brief_description>
Holds a line of text.
</brief_description>
diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml
index 8df53b8423..e9afe47ee8 100644
--- a/doc/classes/TextParagraph.xml
+++ b/doc/classes/TextParagraph.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextParagraph" inherits="Reference" version="4.0">
+<class name="TextParagraph" inherits="RefCounted" version="4.0">
<brief_description>
Holds a paragraph of text.
</brief_description>
diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml
index 88f46e3937..5ac9416b72 100644
--- a/doc/classes/Thread.xml
+++ b/doc/classes/Thread.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Thread" inherits="Reference" version="4.0">
+<class name="Thread" inherits="RefCounted" version="4.0">
<brief_description>
A unit of execution in a process.
</brief_description>
diff --git a/doc/classes/TriangleMesh.xml b/doc/classes/TriangleMesh.xml
index 39bee0c2b3..cfdb6fe33e 100644
--- a/doc/classes/TriangleMesh.xml
+++ b/doc/classes/TriangleMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TriangleMesh" inherits="Reference" version="4.0">
+<class name="TriangleMesh" inherits="RefCounted" version="4.0">
<brief_description>
Internal mesh type.
</brief_description>
diff --git a/doc/classes/UDPServer.xml b/doc/classes/UDPServer.xml
index 6f3ccb8a17..5e2906450c 100644
--- a/doc/classes/UDPServer.xml
+++ b/doc/classes/UDPServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="UDPServer" inherits="Reference" version="4.0">
+<class name="UDPServer" inherits="RefCounted" version="4.0">
<brief_description>
Helper class to implement a UDP server.
</brief_description>
diff --git a/doc/classes/Variant.xml b/doc/classes/Variant.xml
index 5882074698..240c1c909f 100644
--- a/doc/classes/Variant.xml
+++ b/doc/classes/Variant.xml
@@ -9,7 +9,7 @@
[gdscript]
var foo = 2 # foo is dynamically an integer
foo = "Now foo is a string!"
- foo = Reference.new() # foo is an Object
+ foo = RefCounted.new() # foo is an Object
var bar: int = 2 # bar is a statically typed integer.
# bar = "Uh oh! I can't make static variables become a different type!"
[/gdscript]
diff --git a/doc/classes/VelocityTracker3D.xml b/doc/classes/VelocityTracker3D.xml
index 98f7533c76..2d5e3a4d30 100644
--- a/doc/classes/VelocityTracker3D.xml
+++ b/doc/classes/VelocityTracker3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VelocityTracker3D" inherits="Reference" version="4.0">
+<class name="VelocityTracker3D" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
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 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WeakRef" inherits="Reference" version="4.0">
+<class name="WeakRef" inherits="RefCounted" version="4.0">
<brief_description>
Holds an [Object], but does not contribute to the reference count if the object is a reference.
</brief_description>
<description>
- 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.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/XMLParser.xml b/doc/classes/XMLParser.xml
index 2849ea62ab..ab5c58c51c 100644
--- a/doc/classes/XMLParser.xml
+++ b/doc/classes/XMLParser.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="XMLParser" inherits="Reference" version="4.0">
+<class name="XMLParser" inherits="RefCounted" version="4.0">
<brief_description>
Low-level class for creating parsers for [url=https://en.wikipedia.org/wiki/XML]XML[/url] files.
</brief_description>
diff --git a/doc/classes/XRInterface.xml b/doc/classes/XRInterface.xml
index 034cb51be3..3bc4adcf94 100644
--- a/doc/classes/XRInterface.xml
+++ b/doc/classes/XRInterface.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="XRInterface" inherits="Reference" version="4.0">
+<class name="XRInterface" inherits="RefCounted" version="4.0">
<brief_description>
Base class for an AR/VR interface implementation.
</brief_description>
diff --git a/doc/classes/XRPositionalTracker.xml b/doc/classes/XRPositionalTracker.xml
index 2cf8e1d6f5..cd8cb71cd9 100644
--- a/doc/classes/XRPositionalTracker.xml
+++ b/doc/classes/XRPositionalTracker.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="XRPositionalTracker" inherits="Reference" version="4.0">
+<class name="XRPositionalTracker" inherits="RefCounted" version="4.0">
<brief_description>
A tracked object.
</brief_description>
diff --git a/doc/translations/ar.po b/doc/translations/ar.po
index b4ae664714..77a3d39f27 100644
--- a/doc/translations/ar.po
+++ b/doc/translations/ar.po
@@ -33036,7 +33036,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33055,12 +33055,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34557,7 +34557,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -41765,30 +41765,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41796,7 +41796,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54060,7 +54060,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59139,7 +59139,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], 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 "
diff --git a/doc/translations/ca.po b/doc/translations/ca.po
index 6485111b20..8ea801181d 100644
--- a/doc/translations/ca.po
+++ b/doc/translations/ca.po
@@ -33067,7 +33067,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33086,12 +33086,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34588,7 +34588,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -41796,30 +41796,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41827,7 +41827,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54091,7 +54091,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59170,7 +59170,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], 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 "
diff --git a/doc/translations/classes.pot b/doc/translations/classes.pot
index d14b0d9b1f..d12fa78b0e 100644
--- a/doc/translations/classes.pot
+++ b/doc/translations/classes.pot
@@ -33037,7 +33037,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33056,12 +33056,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34558,7 +34558,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -41766,30 +41766,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41797,7 +41797,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54061,7 +54061,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59140,7 +59140,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], 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 "
diff --git a/doc/translations/cs.po b/doc/translations/cs.po
index 7b958a5049..a267656497 100644
--- a/doc/translations/cs.po
+++ b/doc/translations/cs.po
@@ -33536,7 +33536,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33555,12 +33555,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -35058,7 +35058,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -42266,30 +42266,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -42297,7 +42297,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54562,7 +54562,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59645,7 +59645,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], 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 "
diff --git a/doc/translations/de.po b/doc/translations/de.po
index 2e3e219ba6..181d64d525 100644
--- a/doc/translations/de.po
+++ b/doc/translations/de.po
@@ -33453,7 +33453,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33472,12 +33472,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
#, fuzzy
msgid ""
@@ -34984,7 +34984,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -42226,30 +42226,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -42257,7 +42257,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54558,7 +54558,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59796,7 +59796,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], 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 "
diff --git a/doc/translations/es.po b/doc/translations/es.po
index 3078c1bf90..7df36316b7 100644
--- a/doc/translations/es.po
+++ b/doc/translations/es.po
@@ -44834,7 +44834,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -44853,9 +44853,9 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
"Toda clase que no es un tipo integrado hereda de esta clase.\n"
"Puedes construir Objetos desde lenguajes de scripting, usando [code]Object."
@@ -44866,7 +44866,7 @@ msgstr ""
"llama al método [method free] desde tu script o elimina la instancia desde C+"
"+.\n"
"Algunas clases que extienden a Object añaden gestión de memoria. Este es el "
-"caso de [Reference], que cuenta las referencias y se borra a sí misma "
+"caso de [RefCounted], que cuenta las referencias y se borra a sí misma "
"automáticamente cuando deja de estar referenciada. [Node], otro tipo "
"fundamental, borra todos sus hijos cuando se libera de la memoria.\n"
"Los objetos exportan propiedades, que son principalmente útiles para el "
@@ -44887,7 +44887,7 @@ msgstr ""
"sencilla de notificar al objeto sobre diferentes eventos, de modo que todos "
"ellos pueden ser manejados juntos. Véase [method _notification]."
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
#, fuzzy
msgid ""
@@ -46525,7 +46525,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -53779,30 +53779,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -53810,7 +53810,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -66189,7 +66189,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -71348,7 +71348,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], 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 "
diff --git a/doc/translations/fa.po b/doc/translations/fa.po
index 733d3bb969..e440146dd3 100644
--- a/doc/translations/fa.po
+++ b/doc/translations/fa.po
@@ -33042,7 +33042,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33061,12 +33061,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34563,7 +34563,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -41771,30 +41771,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41802,7 +41802,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54066,7 +54066,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59145,7 +59145,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], 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 "
diff --git a/doc/translations/fi.po b/doc/translations/fi.po
index 0a40863a52..92ec4f29dd 100644
--- a/doc/translations/fi.po
+++ b/doc/translations/fi.po
@@ -33055,7 +33055,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33074,12 +33074,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34576,7 +34576,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -41784,30 +41784,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41815,7 +41815,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54080,7 +54080,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59168,7 +59168,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], 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 "
diff --git a/doc/translations/fr.po b/doc/translations/fr.po
index f3e26ebc61..7717474c0f 100644
--- a/doc/translations/fr.po
+++ b/doc/translations/fr.po
@@ -33403,7 +33403,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33422,12 +33422,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34927,7 +34927,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -42142,30 +42142,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -42173,7 +42173,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54519,7 +54519,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59618,7 +59618,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], 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 "
diff --git a/doc/translations/id.po b/doc/translations/id.po
index 1bce3d6b50..edfd392f4f 100644
--- a/doc/translations/id.po
+++ b/doc/translations/id.po
@@ -33068,7 +33068,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33087,12 +33087,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34589,7 +34589,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -41797,30 +41797,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41828,7 +41828,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54092,7 +54092,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59171,7 +59171,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], 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 "
diff --git a/doc/translations/it.po b/doc/translations/it.po
index 18e162476c..353eae4116 100644
--- a/doc/translations/it.po
+++ b/doc/translations/it.po
@@ -33334,7 +33334,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33353,12 +33353,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34856,7 +34856,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -42067,30 +42067,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -42098,7 +42098,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54365,7 +54365,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59459,7 +59459,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], 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 "
diff --git a/doc/translations/ja.po b/doc/translations/ja.po
index ede80a35ef..1424b24153 100644
--- a/doc/translations/ja.po
+++ b/doc/translations/ja.po
@@ -34306,7 +34306,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -34325,12 +34325,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
#, fuzzy
msgid ""
@@ -35830,7 +35830,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -43046,30 +43046,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -43077,7 +43077,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -55349,7 +55349,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -60446,7 +60446,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], 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 "
diff --git a/doc/translations/ko.po b/doc/translations/ko.po
index e71cd06ba7..8e8aef2eaf 100644
--- a/doc/translations/ko.po
+++ b/doc/translations/ko.po
@@ -33044,7 +33044,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33063,12 +33063,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34565,7 +34565,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -41773,30 +41773,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41804,7 +41804,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54068,7 +54068,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59149,7 +59149,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], 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 "
diff --git a/doc/translations/nl.po b/doc/translations/nl.po
index 032ff95bdb..096e59f497 100644
--- a/doc/translations/nl.po
+++ b/doc/translations/nl.po
@@ -33070,7 +33070,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33089,12 +33089,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34591,7 +34591,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -41799,30 +41799,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41830,7 +41830,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54094,7 +54094,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59173,7 +59173,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], 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 "
diff --git a/doc/translations/pl.po b/doc/translations/pl.po
index b0c94b55be..5ef41b155a 100644
--- a/doc/translations/pl.po
+++ b/doc/translations/pl.po
@@ -33089,7 +33089,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33108,12 +33108,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34610,7 +34610,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -41818,30 +41818,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41849,7 +41849,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54117,7 +54117,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59203,7 +59203,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], 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 "
diff --git a/doc/translations/pt_BR.po b/doc/translations/pt_BR.po
index a508d38859..ef62950d51 100644
--- a/doc/translations/pt_BR.po
+++ b/doc/translations/pt_BR.po
@@ -33083,7 +33083,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33102,12 +33102,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34604,7 +34604,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -41812,30 +41812,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41843,7 +41843,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54108,7 +54108,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59194,7 +59194,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], 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 "
diff --git a/doc/translations/ro.po b/doc/translations/ro.po
index 96c0161312..5f018aa497 100644
--- a/doc/translations/ro.po
+++ b/doc/translations/ro.po
@@ -33044,7 +33044,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33063,12 +33063,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34565,7 +34565,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -41773,30 +41773,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41804,7 +41804,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54068,7 +54068,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59147,7 +59147,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], 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 "
diff --git a/doc/translations/ru.po b/doc/translations/ru.po
index 1108967bc9..0d227beff7 100644
--- a/doc/translations/ru.po
+++ b/doc/translations/ru.po
@@ -33581,7 +33581,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33600,12 +33600,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -35104,7 +35104,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -42362,30 +42362,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -42393,7 +42393,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54666,7 +54666,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59891,7 +59891,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], 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 "
diff --git a/doc/translations/sr_Cyrl.po b/doc/translations/sr_Cyrl.po
index d7d2911b97..d53711d996 100644
--- a/doc/translations/sr_Cyrl.po
+++ b/doc/translations/sr_Cyrl.po
@@ -33054,7 +33054,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33073,12 +33073,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34575,7 +34575,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -41783,30 +41783,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41814,7 +41814,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54078,7 +54078,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59157,7 +59157,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], 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 "
diff --git a/doc/translations/th.po b/doc/translations/th.po
index 5031ecfb0e..7686e22f19 100644
--- a/doc/translations/th.po
+++ b/doc/translations/th.po
@@ -33060,7 +33060,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33079,12 +33079,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34581,7 +34581,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -41789,30 +41789,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41820,7 +41820,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54084,7 +54084,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59163,7 +59163,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], 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 "
diff --git a/doc/translations/tr.po b/doc/translations/tr.po
index a317f4ee83..df9897f1d6 100644
--- a/doc/translations/tr.po
+++ b/doc/translations/tr.po
@@ -33036,7 +33036,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33055,12 +33055,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34557,7 +34557,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -41765,30 +41765,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41796,7 +41796,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54060,7 +54060,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59139,7 +59139,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], 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 "
diff --git a/doc/translations/uk.po b/doc/translations/uk.po
index 8ca75e8b19..d1296da87a 100644
--- a/doc/translations/uk.po
+++ b/doc/translations/uk.po
@@ -33122,7 +33122,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33141,12 +33141,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34643,7 +34643,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -41851,30 +41851,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41882,7 +41882,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54147,7 +54147,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59237,7 +59237,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], 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 "
diff --git a/doc/translations/zh_Hans.po b/doc/translations/zh_Hans.po
index aee852699c..edfb11dec1 100644
--- a/doc/translations/zh_Hans.po
+++ b/doc/translations/zh_Hans.po
@@ -33272,7 +33272,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33291,12 +33291,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34794,7 +34794,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -42002,30 +42002,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -42033,7 +42033,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54298,7 +54298,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59381,7 +59381,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], 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 "
diff --git a/doc/translations/zh_Hant.po b/doc/translations/zh_Hant.po
index 242c8cc086..3afec7ead8 100644
--- a/doc/translations/zh_Hant.po
+++ b/doc/translations/zh_Hant.po
@@ -33073,7 +33073,7 @@ msgid ""
"to delete instances of it manually. To do so, call the [method free] method "
"from your script or delete the instance from C++.\n"
"Some classes that extend Object add memory management. This is the case of "
-"[Reference], which counts references and deletes itself automatically when "
+"[RefCounted], which counts references and deletes itself automatically when "
"no longer referenced. [Node], another fundamental type, deletes all its "
"children when freed from memory.\n"
"Objects export properties, which are mainly useful for storage and editing, "
@@ -33092,12 +33092,12 @@ msgid ""
"Objects also receive notifications. Notifications are a simple way to notify "
"the object about different events, so they can all be handled together. See "
"[method _notification].\n"
-"[b]Note:[/b] Unlike references to a [Reference], references to an Object "
+"[b]Note:[/b] Unlike references to a [RefCounted], references to an Object "
"stored in a variable can become invalid without warning. Therefore, it's "
-"recommended to use [Reference] for data classes instead of [Object]."
+"recommended to use [RefCounted] for data classes instead of [Object]."
msgstr ""
-#: doc/classes/Object.xml:23 doc/classes/Reference.xml:12
+#: doc/classes/Object.xml:23 doc/classes/RefCounted.xml:12
#: doc/classes/Resource.xml:11
msgid ""
"https://docs.godotengine.org/en/latest/getting_started/workflow/"
@@ -34594,7 +34594,7 @@ msgid "Changes the [Color] at the given index."
msgstr ""
#: doc/classes/PackedDataContainerRef.xml:4
-msgid "Reference version of [PackedDataContainer]."
+msgid "RefCounted version of [PackedDataContainer]."
msgstr ""
#: doc/classes/PackedFloat32Array.xml:4
@@ -41802,30 +41802,30 @@ msgid ""
"the half extents."
msgstr ""
-#: doc/classes/Reference.xml:4
+#: doc/classes/RefCounted.xml:4
msgid "Base class for reference-counted objects."
msgstr ""
-#: doc/classes/Reference.xml:7
+#: doc/classes/RefCounted.xml:7
msgid ""
"Base class for any object that keeps a reference count. [Resource] and many "
"other helper objects inherit this class.\n"
"Unlike [Object]s, References keep an internal reference counter so that they "
"are automatically released when no longer in use, and only then. References "
"therefore do not need to be freed manually with [method Object.free].\n"
-"In the vast majority of use cases, instantiating and using [Reference]-"
+"In the vast majority of use cases, instantiating and using [RefCounted]-"
"derived types is all you need to do. The methods provided in this class are "
"only for advanced users, and can cause issues if misused."
msgstr ""
-#: doc/classes/Reference.xml:19
+#: doc/classes/RefCounted.xml:19
msgid ""
"Initializes the internal reference counter. Use this only if you really know "
"what you are doing.\n"
"Returns whether the initialization was successful."
msgstr ""
-#: doc/classes/Reference.xml:27
+#: doc/classes/RefCounted.xml:27
msgid ""
"Increments the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -41833,7 +41833,7 @@ msgid ""
"code] otherwise."
msgstr ""
-#: doc/classes/Reference.xml:35
+#: doc/classes/RefCounted.xml:35
msgid ""
"Decrements the internal reference counter. Use this only if you really know "
"what you are doing.\n"
@@ -54098,7 +54098,7 @@ msgid ""
"[codeblock]\n"
"var foo = 2 # foo is dynamically an integer\n"
"foo = \"Now foo is a string!\"\n"
-"foo = Reference.new() # foo is an Object\n"
+"foo = RefCounted.new() # foo is an Object\n"
"var bar: int = 2 # bar is a statically typed integer.\n"
"# bar = \"Uh oh! I can't make static variables become a different type!\"\n"
"[/codeblock]\n"
@@ -59181,7 +59181,7 @@ msgstr ""
#: doc/classes/WeakRef.xml:7
msgid ""
-"A weakref can hold a [Reference], without contributing to the reference "
+"A weakref can hold a [RefCounted], 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 "
diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h
index 756eb4acb6..f1d8139511 100644
--- a/editor/animation_track_editor.h
+++ b/editor/animation_track_editor.h
@@ -236,8 +236,8 @@ public:
AnimationTrackEdit();
};
-class AnimationTrackEditPlugin : public Reference {
- GDCLASS(AnimationTrackEditPlugin, Reference);
+class AnimationTrackEditPlugin : public RefCounted {
+ GDCLASS(AnimationTrackEditPlugin, RefCounted);
public:
virtual AnimationTrackEdit *create_value_track_edit(Object *p_object, Variant::Type p_type, const String &p_property, PropertyHint p_hint, const String &p_hint_string, int p_usage);
diff --git a/editor/array_property_edit.h b/editor/array_property_edit.h
index fa3dcbe038..d7e11936a3 100644
--- a/editor/array_property_edit.h
+++ b/editor/array_property_edit.h
@@ -33,8 +33,8 @@
#include "scene/main/node.h"
-class ArrayPropertyEdit : public Reference {
- GDCLASS(ArrayPropertyEdit, Reference);
+class ArrayPropertyEdit : public RefCounted {
+ GDCLASS(ArrayPropertyEdit, RefCounted);
int page;
ObjectID obj;
diff --git a/editor/audio_stream_preview.h b/editor/audio_stream_preview.h
index accc7275c0..61567598ed 100644
--- a/editor/audio_stream_preview.h
+++ b/editor/audio_stream_preview.h
@@ -36,8 +36,8 @@
#include "scene/main/node.h"
#include "servers/audio/audio_stream.h"
-class AudioStreamPreview : public Reference {
- GDCLASS(AudioStreamPreview, Reference);
+class AudioStreamPreview : public RefCounted {
+ GDCLASS(AudioStreamPreview, RefCounted);
friend class AudioStream;
Vector<uint8_t> preview;
float length;
diff --git a/editor/debugger/editor_debugger_server.h b/editor/debugger/editor_debugger_server.h
index 6458421e7a..6216d0df3d 100644
--- a/editor/debugger/editor_debugger_server.h
+++ b/editor/debugger/editor_debugger_server.h
@@ -32,9 +32,9 @@
#define EDITOR_DEBUGGER_CONNECTION_H
#include "core/debugger/remote_debugger_peer.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
-class EditorDebuggerServer : public Reference {
+class EditorDebuggerServer : public RefCounted {
public:
typedef EditorDebuggerServer *(*CreateServerFunc)(const String &p_uri);
diff --git a/editor/dictionary_property_edit.h b/editor/dictionary_property_edit.h
index e0fd945491..d1401c5e5f 100644
--- a/editor/dictionary_property_edit.h
+++ b/editor/dictionary_property_edit.h
@@ -33,8 +33,8 @@
#include "scene/main/node.h"
-class DictionaryPropertyEdit : public Reference {
- GDCLASS(DictionaryPropertyEdit, Reference);
+class DictionaryPropertyEdit : public RefCounted {
+ GDCLASS(DictionaryPropertyEdit, RefCounted);
ObjectID obj;
StringName property;
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp
index 5d1ec853c9..56c6a416af 100644
--- a/editor/editor_data.cpp
+++ b/editor/editor_data.cpp
@@ -83,7 +83,7 @@ void EditorHistory::cleanup_history() {
void EditorHistory::_add_object(ObjectID p_object, const String &p_property, int p_level_change, bool p_inspector_only) {
Object *obj = ObjectDB::get_instance(p_object);
ERR_FAIL_COND(!obj);
- Reference *r = Object::cast_to<Reference>(obj);
+ RefCounted *r = Object::cast_to<RefCounted>(obj);
Obj o;
if (r) {
o.ref = REF(r);
diff --git a/editor/editor_export.h b/editor/editor_export.h
index 8474f4ef6d..c9401df9c2 100644
--- a/editor/editor_export.h
+++ b/editor/editor_export.h
@@ -42,8 +42,8 @@ class EditorExportPlatform;
class EditorFileSystemDirectory;
struct EditorProgress;
-class EditorExportPreset : public Reference {
- GDCLASS(EditorExportPreset, Reference);
+class EditorExportPreset : public RefCounted {
+ GDCLASS(EditorExportPreset, RefCounted);
public:
enum ExportFilter {
@@ -161,8 +161,8 @@ struct SharedObject {
SharedObject() {}
};
-class EditorExportPlatform : public Reference {
- GDCLASS(EditorExportPlatform, Reference);
+class EditorExportPlatform : public RefCounted {
+ GDCLASS(EditorExportPlatform, RefCounted);
public:
typedef Error (*EditorExportSaveFunction)(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total, const Vector<String> &p_enc_in_filters, const Vector<String> &p_enc_ex_filters, const Vector<uint8_t> &p_key);
@@ -284,8 +284,8 @@ public:
EditorExportPlatform();
};
-class EditorExportPlugin : public Reference {
- GDCLASS(EditorExportPlugin, Reference);
+class EditorExportPlugin : public RefCounted {
+ GDCLASS(EditorExportPlugin, RefCounted);
friend class EditorExportPlatform;
diff --git a/editor/editor_feature_profile.h b/editor/editor_feature_profile.h
index 8f4d09ea32..d31498bfc6 100644
--- a/editor/editor_feature_profile.h
+++ b/editor/editor_feature_profile.h
@@ -32,7 +32,7 @@
#define EDITOR_FEATURE_PROFILE_H
#include "core/io/file_access.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "editor/editor_file_dialog.h"
#include "editor_help.h"
#include "scene/gui/dialogs.h"
@@ -41,8 +41,8 @@
#include "scene/gui/split_container.h"
#include "scene/gui/tree.h"
-class EditorFeatureProfile : public Reference {
- GDCLASS(EditorFeatureProfile, Reference);
+class EditorFeatureProfile : public RefCounted {
+ GDCLASS(EditorFeatureProfile, RefCounted);
public:
enum Feature {
diff --git a/editor/editor_help_search.h b/editor/editor_help_search.h
index 350a02315f..75da2d5aba 100644
--- a/editor/editor_help_search.h
+++ b/editor/editor_help_search.h
@@ -83,7 +83,7 @@ public:
EditorHelpSearch();
};
-class EditorHelpSearch::Runner : public Reference {
+class EditorHelpSearch::Runner : public RefCounted {
enum Phase {
PHASE_MATCH_CLASSES_INIT,
PHASE_MATCH_CLASSES,
diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h
index 348dea7086..e4bcab3e3f 100644
--- a/editor/editor_inspector.h
+++ b/editor/editor_inspector.h
@@ -175,8 +175,8 @@ public:
EditorProperty();
};
-class EditorInspectorPlugin : public Reference {
- GDCLASS(EditorInspectorPlugin, Reference);
+class EditorInspectorPlugin : public RefCounted {
+ GDCLASS(EditorInspectorPlugin, RefCounted);
friend class EditorInspector;
struct AddedEditor {
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index ece7094767..0feee447a4 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -2261,7 +2261,7 @@ void EditorPropertyNodePath::_node_selected(const NodePath &p_path) {
base_node = get_edited_object()->call("get_root_path");
}
- if (!base_node && Object::cast_to<Reference>(get_edited_object())) {
+ if (!base_node && Object::cast_to<RefCounted>(get_edited_object())) {
Node *to_node = get_node(p_path);
ERR_FAIL_COND(!to_node);
path = get_tree()->get_edited_scene_root()->get_path_to(to_node);
diff --git a/editor/editor_properties_array_dict.h b/editor/editor_properties_array_dict.h
index fa5adc788d..aa2d8744b1 100644
--- a/editor/editor_properties_array_dict.h
+++ b/editor/editor_properties_array_dict.h
@@ -36,8 +36,8 @@
#include "editor/filesystem_dock.h"
#include "scene/gui/button.h"
-class EditorPropertyArrayObject : public Reference {
- GDCLASS(EditorPropertyArrayObject, Reference);
+class EditorPropertyArrayObject : public RefCounted {
+ GDCLASS(EditorPropertyArrayObject, RefCounted);
Variant array;
@@ -52,8 +52,8 @@ public:
EditorPropertyArrayObject();
};
-class EditorPropertyDictionaryObject : public Reference {
- GDCLASS(EditorPropertyDictionaryObject, Reference);
+class EditorPropertyDictionaryObject : public RefCounted {
+ GDCLASS(EditorPropertyDictionaryObject, RefCounted);
Variant new_item_key;
Variant new_item_value;
diff --git a/editor/editor_resource_preview.h b/editor/editor_resource_preview.h
index ffeb22162e..67f83220d0 100644
--- a/editor/editor_resource_preview.h
+++ b/editor/editor_resource_preview.h
@@ -37,8 +37,8 @@
#include "scene/main/node.h"
#include "scene/resources/texture.h"
-class EditorResourcePreviewGenerator : public Reference {
- GDCLASS(EditorResourcePreviewGenerator, Reference);
+class EditorResourcePreviewGenerator : public RefCounted {
+ GDCLASS(EditorResourcePreviewGenerator, RefCounted);
protected:
static void _bind_methods();
diff --git a/editor/editor_run_script.h b/editor/editor_run_script.h
index 83987ecba1..c8412c3c92 100644
--- a/editor/editor_run_script.h
+++ b/editor/editor_run_script.h
@@ -31,11 +31,11 @@
#ifndef EDITOR_RUN_SCRIPT_H
#define EDITOR_RUN_SCRIPT_H
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "editor_plugin.h"
class EditorNode;
-class EditorScript : public Reference {
- GDCLASS(EditorScript, Reference);
+class EditorScript : public RefCounted {
+ GDCLASS(EditorScript, RefCounted);
EditorNode *editor;
diff --git a/editor/editor_translation_parser.h b/editor/editor_translation_parser.h
index 4f8f3537f2..7013bbb8c4 100644
--- a/editor/editor_translation_parser.h
+++ b/editor/editor_translation_parser.h
@@ -32,10 +32,10 @@
#define EDITOR_TRANSLATION_PARSER_H
#include "core/error/error_list.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
-class EditorTranslationParserPlugin : public Reference {
- GDCLASS(EditorTranslationParserPlugin, Reference);
+class EditorTranslationParserPlugin : public RefCounted {
+ GDCLASS(EditorTranslationParserPlugin, RefCounted);
protected:
static void _bind_methods();
diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h
index 8cb84abce2..c6e5836a23 100644
--- a/editor/import/resource_importer_scene.h
+++ b/editor/import/resource_importer_scene.h
@@ -42,8 +42,8 @@ class Material;
class AnimationPlayer;
class EditorSceneImporterMesh;
-class EditorSceneImporter : public Reference {
- GDCLASS(EditorSceneImporter, Reference);
+class EditorSceneImporter : public RefCounted {
+ GDCLASS(EditorSceneImporter, RefCounted);
protected:
static void _bind_methods();
@@ -69,8 +69,8 @@ public:
EditorSceneImporter() {}
};
-class EditorScenePostImport : public Reference {
- GDCLASS(EditorScenePostImport, Reference);
+class EditorScenePostImport : public RefCounted {
+ GDCLASS(EditorScenePostImport, RefCounted);
String source_file;
diff --git a/editor/multi_node_edit.h b/editor/multi_node_edit.h
index 0544eb2d50..2efecb9f65 100644
--- a/editor/multi_node_edit.h
+++ b/editor/multi_node_edit.h
@@ -33,8 +33,8 @@
#include "scene/main/node.h"
-class MultiNodeEdit : public Reference {
- GDCLASS(MultiNodeEdit, Reference);
+class MultiNodeEdit : public RefCounted {
+ GDCLASS(MultiNodeEdit, RefCounted);
List<NodePath> nodes;
struct PLData {
diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h
index ad57850e9d..fa98c6b780 100644
--- a/editor/plugins/visual_shader_editor_plugin.h
+++ b/editor/plugins/visual_shader_editor_plugin.h
@@ -41,8 +41,8 @@
#include "scene/gui/tree.h"
#include "scene/resources/visual_shader.h"
-class VisualShaderNodePlugin : public Reference {
- GDCLASS(VisualShaderNodePlugin, Reference);
+class VisualShaderNodePlugin : public RefCounted {
+ GDCLASS(VisualShaderNodePlugin, RefCounted);
protected:
static void _bind_methods();
@@ -51,8 +51,8 @@ public:
virtual Control *create_editor(const Ref<Resource> &p_parent_resource, const Ref<VisualShaderNode> &p_node);
};
-class VisualShaderGraphPlugin : public Reference {
- GDCLASS(VisualShaderGraphPlugin, Reference);
+class VisualShaderGraphPlugin : public RefCounted {
+ GDCLASS(VisualShaderGraphPlugin, RefCounted);
private:
struct InputPort {
diff --git a/editor/property_editor.h b/editor/property_editor.h
index c6929f3b42..8a587b50b0 100644
--- a/editor/property_editor.h
+++ b/editor/property_editor.h
@@ -50,8 +50,8 @@ class PropertyValueEvaluator;
class CreateDialog;
class PropertySelector;
-class EditorResourceConversionPlugin : public Reference {
- GDCLASS(EditorResourceConversionPlugin, Reference);
+class EditorResourceConversionPlugin : public RefCounted {
+ GDCLASS(EditorResourceConversionPlugin, RefCounted);
protected:
static void _bind_methods();
diff --git a/modules/csg/csg.h b/modules/csg/csg.h
index 4bd79e15a9..c872860486 100644
--- a/modules/csg/csg.h
+++ b/modules/csg/csg.h
@@ -36,7 +36,7 @@
#include "core/math/transform_3d.h"
#include "core/math/vector2.h"
#include "core/math/vector3.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/templates/list.h"
#include "core/templates/map.h"
#include "core/templates/oa_hash_map.h"
diff --git a/modules/fbx/data/fbx_bone.h b/modules/fbx/data/fbx_bone.h
index efba147b89..83918ad1e2 100644
--- a/modules/fbx/data/fbx_bone.h
+++ b/modules/fbx/data/fbx_bone.h
@@ -38,7 +38,7 @@
struct PivotTransform;
-struct FBXBone : public Reference {
+struct FBXBone : public RefCounted {
uint64_t parent_bone_id = 0;
uint64_t bone_id = 0;
diff --git a/modules/fbx/data/fbx_material.h b/modules/fbx/data/fbx_material.h
index 23310b8e1d..5fd4d9212b 100644
--- a/modules/fbx/data/fbx_material.h
+++ b/modules/fbx/data/fbx_material.h
@@ -33,10 +33,10 @@
#include "tools/import_utils.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/string/ustring.h"
-struct FBXMaterial : public Reference {
+struct FBXMaterial : public RefCounted {
String material_name = String();
bool warning_non_pbr_material = false;
FBXDocParser::Material *material = nullptr;
@@ -266,7 +266,7 @@ struct FBXMaterial : public Reference {
/* storing the texture properties like color */
template <class T>
- struct TexturePropertyMapping : Reference {
+ struct TexturePropertyMapping : RefCounted {
StandardMaterial3D::TextureParam map_mode = StandardMaterial3D::TextureParam::TEXTURE_ALBEDO;
const T property = T();
};
diff --git a/modules/fbx/data/fbx_mesh_data.h b/modules/fbx/data/fbx_mesh_data.h
index c4eaa7d170..7486c5c59c 100644
--- a/modules/fbx/data/fbx_mesh_data.h
+++ b/modules/fbx/data/fbx_mesh_data.h
@@ -78,7 +78,7 @@ struct VertexData {
};
// Caches mesh information and instantiates meshes for you using helper functions.
-struct FBXMeshData : Reference {
+struct FBXMeshData : RefCounted {
struct MorphVertexData {
// TODO we have only these??
/// Each element is a vertex. Not supposed to be void.
diff --git a/modules/fbx/data/fbx_node.h b/modules/fbx/data/fbx_node.h
index a6f62f3388..75461e397d 100644
--- a/modules/fbx/data/fbx_node.h
+++ b/modules/fbx/data/fbx_node.h
@@ -40,7 +40,7 @@
class Node3D;
struct PivotTransform;
-struct FBXNode : Reference, ModelAbstraction {
+struct FBXNode : RefCounted, ModelAbstraction {
uint64_t current_node_id = 0;
String node_name = String();
Node3D *godot_node = nullptr;
diff --git a/modules/fbx/data/fbx_skeleton.h b/modules/fbx/data/fbx_skeleton.h
index df937cde49..b6103df949 100644
--- a/modules/fbx/data/fbx_skeleton.h
+++ b/modules/fbx/data/fbx_skeleton.h
@@ -35,14 +35,14 @@
#include "fbx_node.h"
#include "model_abstraction.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "scene/3d/skeleton_3d.h"
struct FBXNode;
struct ImportState;
struct FBXBone;
-struct FBXSkeleton : Reference {
+struct FBXSkeleton : RefCounted {
Ref<FBXNode> fbx_node = Ref<FBXNode>();
Vector<Ref<FBXBone>> skeleton_bones = Vector<Ref<FBXBone>>();
Skeleton3D *skeleton = nullptr;
diff --git a/modules/fbx/data/pivot_transform.h b/modules/fbx/data/pivot_transform.h
index 29cf7a3d0e..099b268075 100644
--- a/modules/fbx/data/pivot_transform.h
+++ b/modules/fbx/data/pivot_transform.h
@@ -32,7 +32,7 @@
#define PIVOT_TRANSFORM_H
#include "core/math/transform_3d.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "model_abstraction.h"
@@ -55,7 +55,7 @@ enum TransformationComp {
TransformationComp_MAXIMUM
};
// Abstract away pivot data so its simpler to handle
-struct PivotTransform : Reference, ModelAbstraction {
+struct PivotTransform : RefCounted, ModelAbstraction {
// at the end we want to keep geometric_ everything, post and pre rotation
// these are used during animation data processing / keyframe ingestion the rest can be simplified down / out.
Quaternion pre_rotation = Quaternion();
diff --git a/modules/gdnative/doc_classes/GDNative.xml b/modules/gdnative/doc_classes/GDNative.xml
index 44d9e32ed8..4f1530598c 100644
--- a/modules/gdnative/doc_classes/GDNative.xml
+++ b/modules/gdnative/doc_classes/GDNative.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GDNative" inherits="Reference" version="4.0">
+<class name="GDNative" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/gdnative/gdnative.h b/modules/gdnative/gdnative.h
index a28c58ec0d..0cc6487ea4 100644
--- a/modules/gdnative/gdnative.h
+++ b/modules/gdnative/gdnative.h
@@ -138,8 +138,8 @@ struct GDNativeCallRegistry {
Vector<StringName> get_native_call_types();
};
-class GDNative : public Reference {
- GDCLASS(GDNative, Reference);
+class GDNative : public RefCounted {
+ GDCLASS(GDNative, RefCounted);
Ref<GDNativeLibrary> library;
diff --git a/modules/gdnative/gdnative/variant.cpp b/modules/gdnative/gdnative/variant.cpp
index 24f50a94f5..cfb57137bb 100644
--- a/modules/gdnative/gdnative/variant.cpp
+++ b/modules/gdnative/gdnative/variant.cpp
@@ -30,7 +30,7 @@
#include "gdnative/variant.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/variant/variant.h"
#ifdef __cplusplus
@@ -200,17 +200,17 @@ void GDAPI godot_variant_new_signal(godot_variant *r_dest, const godot_signal *p
void GDAPI godot_variant_new_object(godot_variant *r_dest, const godot_object *p_obj) {
Variant *dest = (Variant *)r_dest;
const Object *obj = (const Object *)p_obj;
- const Reference *reference = Object::cast_to<Reference>(obj);
+ const RefCounted *ref_counted = Object::cast_to<RefCounted>(obj);
REF ref;
- if (reference) {
- ref = REF(reference);
+ if (ref_counted) {
+ ref = REF(ref_counted);
}
if (!ref.is_null()) {
memnew_placement_custom(dest, Variant, Variant(ref));
} else {
#if defined(DEBUG_METHODS_ENABLED)
- if (reference) {
- ERR_PRINT("Reference object has 0 refcount in godot_variant_new_object - you lost it somewhere.");
+ if (ref_counted) {
+ ERR_PRINT("RefCounted object has 0 refcount in godot_variant_new_object - you lost it somewhere.");
}
#endif
memnew_placement_custom(dest, Variant, Variant(obj));
diff --git a/modules/gdnative/nativescript/api_generator.cpp b/modules/gdnative/nativescript/api_generator.cpp
index 51e839f015..4ad8901f32 100644
--- a/modules/gdnative/nativescript/api_generator.cpp
+++ b/modules/gdnative/nativescript/api_generator.cpp
@@ -121,7 +121,7 @@ struct ClassAPI {
String singleton_name;
bool is_instantiable = false;
// @Unclear
- bool is_reference = false;
+ bool is_ref_counted = false;
bool has_indexing = false; // For builtin types.
String indexed_type; // For builtin types.
bool is_keyed = false; // For builtin types.
@@ -254,10 +254,10 @@ List<ClassAPI> generate_c_api_classes() {
{
List<StringName> inheriters;
- ClassDB::get_inheriters_from_class("Reference", &inheriters);
- bool is_reference = !!inheriters.find(class_name) || class_name == "Reference";
+ ClassDB::get_inheriters_from_class("RefCounted", &inheriters);
+ bool is_ref_counted = !!inheriters.find(class_name) || class_name == "RefCounted";
// @Unclear
- class_api.is_reference = !class_api.is_singleton && is_reference;
+ class_api.is_ref_counted = !class_api.is_singleton && is_ref_counted;
}
// constants
@@ -509,10 +509,10 @@ List<ClassAPI> generate_c_builtin_api_types() {
case Variant::PACKED_VECTOR2_ARRAY:
case Variant::PACKED_VECTOR3_ARRAY:
case Variant::PACKED_COLOR_ARRAY:
- class_api.is_reference = true;
+ class_api.is_ref_counted = true;
break;
default:
- class_api.is_reference = false;
+ class_api.is_ref_counted = false;
break;
}
@@ -652,7 +652,7 @@ static List<String> generate_c_api_json(const List<ClassAPI> &p_api) {
source.push_back(String("\t\t\"singleton\": ") + (api.is_singleton ? "true" : "false") + ",\n");
source.push_back("\t\t\"singleton_name\": \"" + api.singleton_name + "\",\n");
source.push_back(String("\t\t\"instantiable\": ") + (api.is_instantiable ? "true" : "false") + ",\n");
- source.push_back(String("\t\t\"is_reference\": ") + (api.is_reference ? "true" : "false") + ",\n");
+ source.push_back(String("\t\t\"is_ref_counted\": ") + (api.is_ref_counted ? "true" : "false") + ",\n");
source.push_back("\t\t\"constants\": {\n");
for (List<ConstantAPI>::Element *e = api.constants.front(); e; e = e->next()) {
@@ -794,7 +794,7 @@ static List<String> generate_c_builtin_api_json(const List<ClassAPI> &p_api) {
append_indented(source, vformat(R"("name": "%s",)", class_api.class_name));
append_indented(source, vformat(R"("is_instantiable": %s,)", class_api.is_instantiable ? "true" : "false"));
- append_indented(source, vformat(R"("is_reference": %s,)", class_api.is_reference ? "true" : "false"));
+ append_indented(source, vformat(R"("is_ref_counted": %s,)", class_api.is_ref_counted ? "true" : "false"));
append_indented(source, vformat(R"("has_indexing": %s,)", class_api.has_indexing ? "true" : "false"));
append_indented(source, vformat(R"("indexed_type": "%s",)", class_api.has_indexing && class_api.indexed_type == "Nil" ? "Variant" : class_api.indexed_type));
append_indented(source, vformat(R"("is_keyed": %s,)", class_api.is_keyed ? "true" : "false"));
diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp
index 3f705c7858..6c2d038654 100644
--- a/modules/gdnative/nativescript/nativescript.cpp
+++ b/modules/gdnative/nativescript/nativescript.cpp
@@ -505,7 +505,7 @@ Variant NativeScript::_new(const Variant **p_args, int p_argcount, Callable::Cal
if (!(script_data->base_native_type == "")) {
owner = ClassDB::instance(script_data->base_native_type);
} else {
- owner = memnew(Reference);
+ owner = memnew(RefCounted);
}
if (!owner) {
@@ -513,7 +513,7 @@ Variant NativeScript::_new(const Variant **p_args, int p_argcount, Callable::Cal
return Variant();
}
- Reference *r = Object::cast_to<Reference>(owner);
+ RefCounted *r = Object::cast_to<RefCounted>(owner);
if (r) {
ref = REF(r);
}
diff --git a/modules/gdnative/pluginscript/pluginscript_script.cpp b/modules/gdnative/pluginscript/pluginscript_script.cpp
index 56fc7273f2..1dabb1db63 100644
--- a/modules/gdnative/pluginscript/pluginscript_script.cpp
+++ b/modules/gdnative/pluginscript/pluginscript_script.cpp
@@ -94,7 +94,7 @@ Variant PluginScript::_new(const Variant **p_args, int p_argcount, Callable::Cal
Object *owner = nullptr;
if (get_instance_base_type() == "") {
- owner = memnew(Reference);
+ owner = memnew(RefCounted);
} else {
owner = ClassDB::instance(get_instance_base_type());
}
@@ -104,7 +104,7 @@ Variant PluginScript::_new(const Variant **p_args, int p_argcount, Callable::Cal
return Variant();
}
- Reference *r = Object::cast_to<Reference>(owner);
+ RefCounted *r = Object::cast_to<RefCounted>(owner);
if (r) {
ref = REF(r);
}
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp
index fdbe557956..1aafaf9351 100644
--- a/modules/gdscript/gdscript.cpp
+++ b/modules/gdscript/gdscript.cpp
@@ -75,9 +75,9 @@ Variant GDScriptNativeClass::_new() {
Object *o = instance();
ERR_FAIL_COND_V_MSG(!o, Variant(), "Class type: '" + String(name) + "' is not instantiable.");
- Reference *ref = Object::cast_to<Reference>(o);
- if (ref) {
- return REF(ref);
+ RefCounted *rc = Object::cast_to<RefCounted>(o);
+ if (rc) {
+ return REF(rc);
} else {
return o;
}
@@ -98,11 +98,11 @@ void GDScript::_super_implicit_constructor(GDScript *p_script, GDScriptInstance
p_script->implicit_initializer->call(p_instance, nullptr, 0, r_error);
}
-GDScriptInstance *GDScript::_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_isref, Callable::CallError &r_error) {
+GDScriptInstance *GDScript::_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_is_ref_counted, Callable::CallError &r_error) {
/* STEP 1, CREATE */
GDScriptInstance *instance = memnew(GDScriptInstance);
- instance->base_ref = p_isref;
+ instance->base_ref_counted = p_is_ref_counted;
instance->members.resize(member_indices.size());
instance->script = Ref<GDScript>(this);
instance->owner = p_owner;
@@ -172,11 +172,11 @@ Variant GDScript::_new(const Variant **p_args, int p_argcount, Callable::CallErr
if (_baseptr->native.ptr()) {
owner = _baseptr->native->instance();
} else {
- owner = memnew(Reference); //by default, no base means use reference
+ owner = memnew(RefCounted); //by default, no base means use reference
}
ERR_FAIL_COND_V_MSG(!owner, Variant(), "Can't inherit from a virtual class.");
- Reference *r = Object::cast_to<Reference>(owner);
+ RefCounted *r = Object::cast_to<RefCounted>(owner);
if (r) {
ref = REF(r);
}
@@ -353,7 +353,7 @@ ScriptInstance *GDScript::instance_create(Object *p_this) {
}
Callable::CallError unchecked_error;
- return _create_instance(nullptr, 0, p_this, Object::cast_to<Reference>(p_this) != nullptr, unchecked_error);
+ return _create_instance(nullptr, 0, p_this, Object::cast_to<RefCounted>(p_this) != nullptr, unchecked_error);
}
PlaceHolderScriptInstance *GDScript::placeholder_instance_create(Object *p_this) {
@@ -1576,7 +1576,7 @@ void GDScriptInstance::reload_members() {
GDScriptInstance::GDScriptInstance() {
owner = nullptr;
- base_ref = false;
+ base_ref_counted = false;
}
GDScriptInstance::~GDScriptInstance() {
@@ -2132,7 +2132,7 @@ String GDScriptLanguage::get_global_class_name(const String &p_path, String *r_b
break;
}
} else {
- *r_base_type = "Reference";
+ *r_base_type = "RefCounted";
subclass = nullptr;
}
}
diff --git a/modules/gdscript/gdscript.h b/modules/gdscript/gdscript.h
index 8b1b859ca2..0584ced35e 100644
--- a/modules/gdscript/gdscript.h
+++ b/modules/gdscript/gdscript.h
@@ -39,8 +39,8 @@
#include "core/object/script_language.h"
#include "gdscript_function.h"
-class GDScriptNativeClass : public Reference {
- GDCLASS(GDScriptNativeClass, Reference);
+class GDScriptNativeClass : public RefCounted {
+ GDCLASS(GDScriptNativeClass, RefCounted);
StringName name;
@@ -132,7 +132,7 @@ class GDScript : public Script {
SelfList<GDScriptFunctionState>::List pending_func_states;
void _super_implicit_constructor(GDScript *p_script, GDScriptInstance *p_instance, Callable::CallError &r_error);
- GDScriptInstance *_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_isref, Callable::CallError &r_error);
+ GDScriptInstance *_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_is_ref_counted, Callable::CallError &r_error);
void _set_subclass_path(Ref<GDScript> &p_sc, const String &p_path);
@@ -157,7 +157,7 @@ class GDScript : public Script {
void _get_script_method_list(List<MethodInfo> *r_list, bool p_include_base) const;
void _get_script_signal_list(List<MethodInfo> *r_list, bool p_include_base) const;
- // This method will map the class name from "Reference" to "MyClass.InnerClass".
+ // This method will map the class name from "RefCounted" to "MyClass.InnerClass".
static String _get_gdscript_reference_class_name(const GDScript *p_gdscript);
protected:
@@ -270,7 +270,7 @@ class GDScriptInstance : public ScriptInstance {
Map<StringName, int> member_indices_cache; //used only for hot script reloading
#endif
Vector<Variant> members;
- bool base_ref;
+ bool base_ref_counted;
SelfList<GDScriptFunctionState>::List pending_func_states;
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp
index e901b74616..c3edc813d2 100644
--- a/modules/gdscript/gdscript_analyzer.cpp
+++ b/modules/gdscript/gdscript_analyzer.cpp
@@ -163,7 +163,7 @@ Error GDScriptAnalyzer::resolve_inheritance(GDScriptParser::ClassNode *p_class,
if (!p_class->extends_used) {
result.type_source = GDScriptParser::DataType::ANNOTATED_INFERRED;
result.kind = GDScriptParser::DataType::NATIVE;
- result.native_type = "Reference";
+ result.native_type = "RefCounted";
} else {
result.type_source = GDScriptParser::DataType::ANNOTATED_EXPLICIT;
diff --git a/modules/gdscript/gdscript_analyzer.h b/modules/gdscript/gdscript_analyzer.h
index aabf407c76..8cd3fcf837 100644
--- a/modules/gdscript/gdscript_analyzer.h
+++ b/modules/gdscript/gdscript_analyzer.h
@@ -32,7 +32,7 @@
#define GDSCRIPT_ANALYZER_H
#include "core/object/object.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/templates/set.h"
#include "gdscript_cache.h"
#include "gdscript_parser.h"
diff --git a/modules/gdscript/gdscript_cache.h b/modules/gdscript/gdscript_cache.h
index d1d2a2abbf..943638d29f 100644
--- a/modules/gdscript/gdscript_cache.h
+++ b/modules/gdscript/gdscript_cache.h
@@ -31,7 +31,7 @@
#ifndef GDSCRIPT_CACHE_H
#define GDSCRIPT_CACHE_H
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/os/mutex.h"
#include "core/templates/hash_map.h"
#include "core/templates/set.h"
@@ -40,7 +40,7 @@
class GDScriptAnalyzer;
class GDScriptParser;
-class GDScriptParserRef : public Reference {
+class GDScriptParserRef : public RefCounted {
public:
enum Status {
EMPTY,
diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp
index 49da4049bb..6d6b9e15af 100644
--- a/modules/gdscript/gdscript_compiler.cpp
+++ b/modules/gdscript/gdscript_compiler.cpp
@@ -2512,7 +2512,7 @@ Error GDScriptCompiler::_parse_class_blocks(GDScript *p_script, const GDScriptPa
p_script->placeholders.erase(psi); //remove placeholder
GDScriptInstance *instance = memnew(GDScriptInstance);
- instance->base_ref = Object::cast_to<Reference>(E->get());
+ instance->base_ref_counted = Object::cast_to<RefCounted>(E->get());
instance->members.resize(p_script->member_indices.size());
instance->script = Ref<GDScript>(p_script);
instance->owner = E->get();
diff --git a/modules/gdscript/gdscript_function.h b/modules/gdscript/gdscript_function.h
index cd1704cb03..553c2ecc01 100644
--- a/modules/gdscript/gdscript_function.h
+++ b/modules/gdscript/gdscript_function.h
@@ -31,7 +31,7 @@
#ifndef GDSCRIPT_FUNCTION_H
#define GDSCRIPT_FUNCTION_H
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/object/script_language.h"
#include "core/os/thread.h"
#include "core/string/string_name.h"
@@ -597,8 +597,8 @@ public:
~GDScriptFunction();
};
-class GDScriptFunctionState : public Reference {
- GDCLASS(GDScriptFunctionState, Reference);
+class GDScriptFunctionState : public RefCounted {
+ GDCLASS(GDScriptFunctionState, RefCounted);
friend class GDScriptFunction;
GDScriptFunction *function = nullptr;
GDScriptFunction::CallState state;
diff --git a/modules/gdscript/gdscript_lambda_callable.h b/modules/gdscript/gdscript_lambda_callable.h
index 357c845250..336778d549 100644
--- a/modules/gdscript/gdscript_lambda_callable.h
+++ b/modules/gdscript/gdscript_lambda_callable.h
@@ -31,7 +31,7 @@
#ifndef GDSCRIPT_LAMBDA_CALLABLE
#define GDSCRIPT_LAMBDA_CALLABLE
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/templates/vector.h"
#include "core/variant/callable.h"
#include "core/variant/variant.h"
diff --git a/modules/gdscript/gdscript_parser.h b/modules/gdscript/gdscript_parser.h
index ee5e411cad..9e0b60a407 100644
--- a/modules/gdscript/gdscript_parser.h
+++ b/modules/gdscript/gdscript_parser.h
@@ -33,7 +33,7 @@
#include "core/io/multiplayer_api.h"
#include "core/io/resource.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/object/script_language.h"
#include "core/string/string_name.h"
#include "core/string/ustring.h"
diff --git a/modules/gdscript/language_server/gdscript_language_protocol.h b/modules/gdscript/language_server/gdscript_language_protocol.h
index a5c5a233b1..969c38eab6 100644
--- a/modules/gdscript/language_server/gdscript_language_protocol.h
+++ b/modules/gdscript/language_server/gdscript_language_protocol.h
@@ -46,7 +46,7 @@ class GDScriptLanguageProtocol : public JSONRPC {
GDCLASS(GDScriptLanguageProtocol, JSONRPC)
private:
- struct LSPeer : Reference {
+ struct LSPeer : RefCounted {
Ref<StreamPeerTCP> connection;
uint8_t req_buf[LSP_MAX_BUFFER_SIZE];
diff --git a/modules/gdscript/language_server/gdscript_text_document.h b/modules/gdscript/language_server/gdscript_text_document.h
index 4696966e85..17f1d5d5e3 100644
--- a/modules/gdscript/language_server/gdscript_text_document.h
+++ b/modules/gdscript/language_server/gdscript_text_document.h
@@ -32,11 +32,11 @@
#define GDSCRIPT_TEXT_DOCUMENT_H
#include "core/io/file_access.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "lsp.hpp"
-class GDScriptTextDocument : public Reference {
- GDCLASS(GDScriptTextDocument, Reference)
+class GDScriptTextDocument : public RefCounted {
+ GDCLASS(GDScriptTextDocument, RefCounted)
protected:
static void _bind_methods();
diff --git a/modules/gdscript/language_server/gdscript_workspace.h b/modules/gdscript/language_server/gdscript_workspace.h
index 27616a2989..8b166a873c 100644
--- a/modules/gdscript/language_server/gdscript_workspace.h
+++ b/modules/gdscript/language_server/gdscript_workspace.h
@@ -37,8 +37,8 @@
#include "gdscript_extend_parser.h"
#include "lsp.hpp"
-class GDScriptWorkspace : public Reference {
- GDCLASS(GDScriptWorkspace, Reference);
+class GDScriptWorkspace : public RefCounted {
+ GDCLASS(GDScriptWorkspace, RefCounted);
private:
void _get_owners(EditorFileSystemDirectory *efsd, String p_path, List<String> &owners);
diff --git a/modules/gdscript/language_server/lsp.hpp b/modules/gdscript/language_server/lsp.hpp
index 47bcfeaefc..a7dcfdb22d 100644
--- a/modules/gdscript/language_server/lsp.hpp
+++ b/modules/gdscript/language_server/lsp.hpp
@@ -766,7 +766,7 @@ struct MarkupContent {
// Use namespace instead of enumeration to follow the LSP specifications
// lsp::EnumName::EnumValue is OK but lsp::EnumValue is not
-// And here C++ compilers are unhappy with our enumeration name like Color, File, Reference etc.
+// And here C++ compilers are unhappy with our enumeration name like Color, File, RefCounted etc.
/**
* The kind of a completion entry.
*/
@@ -788,7 +788,7 @@ static const int Keyword = 14;
static const int Snippet = 15;
static const int Color = 16;
static const int File = 17;
-static const int Reference = 18;
+static const int RefCounted = 18;
static const int Folder = 19;
static const int EnumMember = 20;
static const int Constant = 21;
diff --git a/modules/gdscript/tests/gdscript_test_runner.cpp b/modules/gdscript/tests/gdscript_test_runner.cpp
index cda348f774..67bc927517 100644
--- a/modules/gdscript/tests/gdscript_test_runner.cpp
+++ b/modules/gdscript/tests/gdscript_test_runner.cpp
@@ -511,9 +511,9 @@ GDScriptTest::TestResult GDScriptTest::execute_test_code(bool p_is_generating) {
// Create object instance for test.
Object *obj = ClassDB::instance(script->get_native()->get_name());
- Ref<Reference> obj_ref;
- if (obj->is_reference()) {
- obj_ref = Ref<Reference>(Object::cast_to<Reference>(obj));
+ Ref<RefCounted> obj_ref;
+ if (obj->is_ref_counted()) {
+ obj_ref = Ref<RefCounted>(Object::cast_to<RefCounted>(obj));
}
obj->set_script(script);
GDScriptInstance *instance = static_cast<GDScriptInstance *>(obj->get_script_instance());
diff --git a/modules/gdscript/tests/gdscript_test_runner_suite.h b/modules/gdscript/tests/gdscript_test_runner_suite.h
index 8fd77239cd..cf4e61f07d 100644
--- a/modules/gdscript/tests/gdscript_test_runner_suite.h
+++ b/modules/gdscript/tests/gdscript_test_runner_suite.h
@@ -51,7 +51,7 @@ TEST_SUITE("[Modules][GDScript]") {
TEST_CASE("[Modules][GDScript] Load source code dynamically and run it") {
Ref<GDScript> gdscript = memnew(GDScript);
gdscript->set_source_code(R"(
-extends Reference
+extends RefCounted
func _init():
set_meta("result", 42)
@@ -64,9 +64,9 @@ func _init():
CHECK_MESSAGE(error == OK, "The script should parse successfully.");
// Run the script by assigning it to a reference-counted object.
- Ref<Reference> reference = memnew(Reference);
- reference->set_script(gdscript);
- CHECK_MESSAGE(int(reference->get_meta("result")) == 42, "The script should assign object metadata successfully.");
+ Ref<RefCounted> ref_counted = memnew(RefCounted);
+ ref_counted->set_script(gdscript);
+ CHECK_MESSAGE(int(ref_counted->get_meta("result")) == 42, "The script should assign object metadata successfully.");
}
} // namespace GDScriptTests
diff --git a/modules/mbedtls/ssl_context_mbedtls.h b/modules/mbedtls/ssl_context_mbedtls.h
index f8f9502caf..1b55a54a10 100644
--- a/modules/mbedtls/ssl_context_mbedtls.h
+++ b/modules/mbedtls/ssl_context_mbedtls.h
@@ -35,7 +35,7 @@
#include "core/io/file_access.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include <mbedtls/config.h>
#include <mbedtls/ctr_drbg.h>
@@ -46,7 +46,7 @@
class SSLContextMbedTLS;
-class CookieContextMbedTLS : public Reference {
+class CookieContextMbedTLS : public RefCounted {
friend class SSLContextMbedTLS;
protected:
@@ -63,7 +63,7 @@ public:
~CookieContextMbedTLS();
};
-class SSLContextMbedTLS : public Reference {
+class SSLContextMbedTLS : public RefCounted {
protected:
bool inited = false;
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 80333321c3..6fbefd88ac 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -863,13 +863,13 @@ void CSharpLanguage::reload_assemblies(bool p_soft_reload) {
List<Ref<CSharpScript>> to_reload;
// We need to keep reference instances alive during reloading
- List<Ref<Reference>> ref_instances;
+ List<Ref<RefCounted>> rc_instances;
for (Map<Object *, CSharpScriptBinding>::Element *E = script_bindings.front(); E; E = E->next()) {
CSharpScriptBinding &script_binding = E->value();
- Reference *ref = Object::cast_to<Reference>(script_binding.owner);
- if (ref) {
- ref_instances.push_back(Ref<Reference>(ref));
+ RefCounted *rc = Object::cast_to<RefCounted>(script_binding.owner);
+ if (rc) {
+ rc_instances.push_back(Ref<RefCounted>(rc));
}
}
@@ -892,9 +892,9 @@ void CSharpLanguage::reload_assemblies(bool p_soft_reload) {
Object *obj = F->get();
script->pending_reload_instances.insert(obj->get_instance_id());
- Reference *ref = Object::cast_to<Reference>(obj);
- if (ref) {
- ref_instances.push_back(Ref<Reference>(ref));
+ RefCounted *rc = Object::cast_to<RefCounted>(obj);
+ if (rc) {
+ rc_instances.push_back(Ref<RefCounted>(rc));
}
}
@@ -903,9 +903,9 @@ void CSharpLanguage::reload_assemblies(bool p_soft_reload) {
Object *obj = F->get()->get_owner();
script->pending_reload_instances.insert(obj->get_instance_id());
- Reference *ref = Object::cast_to<Reference>(obj);
- if (ref) {
- ref_instances.push_back(Ref<Reference>(ref));
+ RefCounted *rc = Object::cast_to<RefCounted>(obj);
+ if (rc) {
+ rc_instances.push_back(Ref<RefCounted>(rc));
}
}
#endif
@@ -1438,16 +1438,16 @@ bool CSharpLanguage::setup_csharp_script_binding(CSharpScriptBinding &r_script_b
r_script_binding.owner = p_object;
// Tie managed to unmanaged
- Reference *ref = Object::cast_to<Reference>(p_object);
+ RefCounted *rc = Object::cast_to<RefCounted>(p_object);
- if (ref) {
+ if (rc) {
// Unsafe refcount increment. The managed instance also counts as a reference.
// This way if the unmanaged world has no references to our owner
// but the managed instance is alive, the refcount will be 1 instead of 0.
// See: godot_icall_Reference_Dtor(MonoObject *p_obj, Object *p_ptr)
- ref->reference();
- CSharpLanguage::get_singleton()->post_unsafe_reference(ref);
+ rc->reference();
+ CSharpLanguage::get_singleton()->post_unsafe_reference(rc);
}
return true;
@@ -1511,10 +1511,10 @@ void CSharpLanguage::free_instance_binding_data(void *p_data) {
}
void CSharpLanguage::refcount_incremented_instance_binding(Object *p_object) {
- Reference *ref_owner = Object::cast_to<Reference>(p_object);
+ RefCounted *rc_owner = Object::cast_to<RefCounted>(p_object);
#ifdef DEBUG_ENABLED
- CRASH_COND(!ref_owner);
+ CRASH_COND(!rc_owner);
CRASH_COND(!p_object->has_script_instance_binding(get_language_index()));
#endif
@@ -1528,7 +1528,7 @@ void CSharpLanguage::refcount_incremented_instance_binding(Object *p_object) {
return;
}
- if (ref_owner->reference_get_count() > 1 && gchandle.is_weak()) { // The managed side also holds a reference, hence 1 instead of 0
+ if (rc_owner->reference_get_count() > 1 && gchandle.is_weak()) { // The managed side also holds a reference, hence 1 instead of 0
GD_MONO_SCOPE_THREAD_ATTACH;
// The reference count was increased after the managed side was the only one referencing our owner.
@@ -1548,10 +1548,10 @@ void CSharpLanguage::refcount_incremented_instance_binding(Object *p_object) {
}
bool CSharpLanguage::refcount_decremented_instance_binding(Object *p_object) {
- Reference *ref_owner = Object::cast_to<Reference>(p_object);
+ RefCounted *rc_owner = Object::cast_to<RefCounted>(p_object);
#ifdef DEBUG_ENABLED
- CRASH_COND(!ref_owner);
+ CRASH_COND(!rc_owner);
CRASH_COND(!p_object->has_script_instance_binding(get_language_index()));
#endif
@@ -1561,7 +1561,7 @@ bool CSharpLanguage::refcount_decremented_instance_binding(Object *p_object) {
CSharpScriptBinding &script_binding = ((Map<Object *, CSharpScriptBinding>::Element *)data)->get();
MonoGCHandleData &gchandle = script_binding.gchandle;
- int refcount = ref_owner->reference_get_count();
+ int refcount = rc_owner->reference_get_count();
if (!script_binding.inited) {
return refcount == 0;
@@ -1592,13 +1592,13 @@ bool CSharpLanguage::refcount_decremented_instance_binding(Object *p_object) {
CSharpInstance *CSharpInstance::create_for_managed_type(Object *p_owner, CSharpScript *p_script, const MonoGCHandleData &p_gchandle) {
CSharpInstance *instance = memnew(CSharpInstance(Ref<CSharpScript>(p_script)));
- Reference *ref = Object::cast_to<Reference>(p_owner);
+ RefCounted *rc = Object::cast_to<RefCounted>(p_owner);
- instance->base_ref = ref != nullptr;
+ instance->base_ref_counted = rc != nullptr;
instance->owner = p_owner;
instance->gchandle = p_gchandle;
- if (instance->base_ref) {
+ if (instance->base_ref_counted) {
instance->_reference_owner_unsafe();
}
@@ -1900,7 +1900,7 @@ Variant CSharpInstance::call(const StringName &p_method, const Variant **p_args,
bool CSharpInstance::_reference_owner_unsafe() {
#ifdef DEBUG_ENABLED
- CRASH_COND(!base_ref);
+ CRASH_COND(!base_ref_counted);
CRASH_COND(owner == nullptr);
CRASH_COND(unsafe_referenced); // already referenced
#endif
@@ -1911,7 +1911,7 @@ bool CSharpInstance::_reference_owner_unsafe() {
// See: _unreference_owner_unsafe()
// May not me referenced yet, so we must use init_ref() instead of reference()
- if (static_cast<Reference *>(owner)->init_ref()) {
+ if (static_cast<RefCounted *>(owner)->init_ref()) {
CSharpLanguage::get_singleton()->post_unsafe_reference(owner);
unsafe_referenced = true;
}
@@ -1921,7 +1921,7 @@ bool CSharpInstance::_reference_owner_unsafe() {
bool CSharpInstance::_unreference_owner_unsafe() {
#ifdef DEBUG_ENABLED
- CRASH_COND(!base_ref);
+ CRASH_COND(!base_ref_counted);
CRASH_COND(owner == nullptr);
#endif
@@ -1938,7 +1938,7 @@ bool CSharpInstance::_unreference_owner_unsafe() {
// Destroying the owner here means self destructing, so we defer the owner destruction to the caller.
CSharpLanguage::get_singleton()->pre_unsafe_unreference(owner);
- return static_cast<Reference *>(owner)->unreference();
+ return static_cast<RefCounted *>(owner)->unreference();
}
MonoObject *CSharpInstance::_internal_new_managed() {
@@ -1970,7 +1970,7 @@ MonoObject *CSharpInstance::_internal_new_managed() {
// Tie managed to unmanaged
gchandle = MonoGCHandleData::new_strong_handle(mono_object);
- if (base_ref) {
+ if (base_ref_counted) {
_reference_owner_unsafe(); // Here, after assigning the gchandle (for the refcount_incremented callback)
}
@@ -1987,7 +1987,7 @@ void CSharpInstance::mono_object_disposed(MonoObject *p_obj) {
disconnect_event_signals();
#ifdef DEBUG_ENABLED
- CRASH_COND(base_ref);
+ CRASH_COND(base_ref_counted);
CRASH_COND(gchandle.is_released());
#endif
CSharpLanguage::get_singleton()->release_script_gchandle(p_obj, gchandle);
@@ -1995,7 +1995,7 @@ void CSharpInstance::mono_object_disposed(MonoObject *p_obj) {
void CSharpInstance::mono_object_disposed_baseref(MonoObject *p_obj, bool p_is_finalizer, bool &r_delete_owner, bool &r_remove_script_instance) {
#ifdef DEBUG_ENABLED
- CRASH_COND(!base_ref);
+ CRASH_COND(!base_ref_counted);
CRASH_COND(gchandle.is_released());
#endif
@@ -2056,13 +2056,13 @@ void CSharpInstance::disconnect_event_signals() {
void CSharpInstance::refcount_incremented() {
#ifdef DEBUG_ENABLED
- CRASH_COND(!base_ref);
+ CRASH_COND(!base_ref_counted);
CRASH_COND(owner == nullptr);
#endif
- Reference *ref_owner = Object::cast_to<Reference>(owner);
+ RefCounted *rc_owner = Object::cast_to<RefCounted>(owner);
- if (ref_owner->reference_get_count() > 1 && gchandle.is_weak()) { // The managed side also holds a reference, hence 1 instead of 0
+ if (rc_owner->reference_get_count() > 1 && gchandle.is_weak()) { // The managed side also holds a reference, hence 1 instead of 0
GD_MONO_SCOPE_THREAD_ATTACH;
// The reference count was increased after the managed side was the only one referencing our owner.
@@ -2078,13 +2078,13 @@ void CSharpInstance::refcount_incremented() {
bool CSharpInstance::refcount_decremented() {
#ifdef DEBUG_ENABLED
- CRASH_COND(!base_ref);
+ CRASH_COND(!base_ref_counted);
CRASH_COND(owner == nullptr);
#endif
- Reference *ref_owner = Object::cast_to<Reference>(owner);
+ RefCounted *rc_owner = Object::cast_to<RefCounted>(owner);
- int refcount = ref_owner->reference_get_count();
+ int refcount = rc_owner->reference_get_count();
if (refcount == 1 && !gchandle.is_weak()) { // The managed side also holds a reference, hence 1 instead of 0
GD_MONO_SCOPE_THREAD_ATTACH;
@@ -2119,12 +2119,12 @@ void CSharpInstance::notification(int p_notification) {
predelete_notified = true;
- if (base_ref) {
- // It's not safe to proceed if the owner derives Reference and the refcount reached 0.
+ if (base_ref_counted) {
+ // It's not safe to proceed if the owner derives RefCounted and the refcount reached 0.
// At this point, Dispose() was already called (manually or from the finalizer) so
// that's not a problem. The refcount wouldn't have reached 0 otherwise, since the
// managed side references it and Dispose() needs to be called to release it.
- // However, this means C# Reference scripts can't receive NOTIFICATION_PREDELETE, but
+ // However, this means C# RefCounted scripts can't receive NOTIFICATION_PREDELETE, but
// this is likely the case with GDScript as well: https://github.com/godotengine/godot/issues/6784
return;
}
@@ -2250,15 +2250,15 @@ CSharpInstance::~CSharpInstance() {
}
// If not being called from the owner's destructor, and we still hold a reference to the owner
- if (base_ref && !ref_dying && owner && unsafe_referenced) {
+ if (base_ref_counted && !ref_dying && owner && unsafe_referenced) {
// The owner's script or script instance is being replaced (or removed)
// Transfer ownership to an "instance binding"
- Reference *ref_owner = static_cast<Reference *>(owner);
+ RefCounted *rc_owner = static_cast<RefCounted *>(owner);
// We will unreference the owner before referencing it again, so we need to keep it alive
- Ref<Reference> scope_keep_owner_alive(ref_owner);
+ Ref<RefCounted> scope_keep_owner_alive(rc_owner);
(void)scope_keep_owner_alive;
// Unreference the owner here, before the new "instance binding" references it.
@@ -2283,7 +2283,7 @@ CSharpInstance::~CSharpInstance() {
#ifdef DEBUG_ENABLED
// The "instance binding" holds a reference so the refcount should be at least 2 before `scope_keep_owner_alive` goes out of scope
- CRASH_COND(ref_owner->reference_get_count() <= 1);
+ CRASH_COND(rc_owner->reference_get_count() <= 1);
#endif
}
@@ -2511,7 +2511,7 @@ bool CSharpScript::_update_exports() {
#ifdef TOOLS_ENABLED
if (is_editor) {
// Need to check this here, before disposal
- bool base_ref = Object::cast_to<Reference>(tmp_native) != nullptr;
+ bool base_ref_counted = Object::cast_to<RefCounted>(tmp_native) != nullptr;
// Dispose the temporary managed instance
@@ -2526,7 +2526,7 @@ bool CSharpScript::_update_exports() {
GDMonoUtils::free_gchandle(tmp_pinned_gchandle);
tmp_object = nullptr;
- if (tmp_native && !base_ref) {
+ if (tmp_native && !base_ref_counted) {
Node *node = Object::cast_to<Node>(tmp_native);
if (node && node->is_inside_tree()) {
ERR_PRINT("Temporary instance was added to the scene tree.");
@@ -3077,7 +3077,7 @@ StringName CSharpScript::get_instance_base_type() const {
}
}
-CSharpInstance *CSharpScript::_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_isref, Callable::CallError &r_error) {
+CSharpInstance *CSharpScript::_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_is_ref_counted, Callable::CallError &r_error) {
GD_MONO_ASSERT_THREAD_ATTACHED;
/* STEP 1, CREATE */
@@ -3093,10 +3093,10 @@ CSharpInstance *CSharpScript::_create_instance(const Variant **p_args, int p_arg
ERR_FAIL_V_MSG(nullptr, "Constructor not found.");
}
- Ref<Reference> ref;
- if (p_isref) {
+ Ref<RefCounted> ref;
+ if (p_is_ref_counted) {
// Hold it alive. Important if we have to dispose a script instance binding before creating the CSharpInstance.
- ref = Ref<Reference>(static_cast<Reference *>(p_owner));
+ ref = Ref<RefCounted>(static_cast<RefCounted *>(p_owner));
}
// If the object had a script instance binding, dispose it before adding the CSharpInstance
@@ -3122,7 +3122,7 @@ CSharpInstance *CSharpScript::_create_instance(const Variant **p_args, int p_arg
}
CSharpInstance *instance = memnew(CSharpInstance(Ref<CSharpScript>(this)));
- instance->base_ref = p_isref;
+ instance->base_ref_counted = p_is_ref_counted;
instance->owner = p_owner;
instance->owner->set_script_instance(instance);
@@ -3147,7 +3147,7 @@ CSharpInstance *CSharpScript::_create_instance(const Variant **p_args, int p_arg
// Tie managed to unmanaged
instance->gchandle = MonoGCHandleData::new_strong_handle(mono_object);
- if (instance->base_ref) {
+ if (instance->base_ref_counted) {
instance->_reference_owner_unsafe(); // Here, after assigning the gchandle (for the refcount_incremented callback)
}
@@ -3182,7 +3182,7 @@ Variant CSharpScript::_new(const Variant **p_args, int p_argcount, Callable::Cal
Object *owner = ClassDB::instance(NATIVE_GDMONOCLASS_NAME(native));
REF ref;
- Reference *r = Object::cast_to<Reference>(owner);
+ RefCounted *r = Object::cast_to<RefCounted>(owner);
if (r) {
ref = REF(r);
}
@@ -3223,7 +3223,7 @@ ScriptInstance *CSharpScript::instance_create(Object *p_this) {
GD_MONO_SCOPE_THREAD_ATTACH;
Callable::CallError unchecked_error;
- return _create_instance(nullptr, 0, p_this, Object::cast_to<Reference>(p_this) != nullptr, unchecked_error);
+ return _create_instance(nullptr, 0, p_this, Object::cast_to<RefCounted>(p_this) != nullptr, unchecked_error);
}
PlaceHolderScriptInstance *CSharpScript::placeholder_instance_create(Object *p_this) {
diff --git a/modules/mono/csharp_script.h b/modules/mono/csharp_script.h
index b389e900f4..c347a902ed 100644
--- a/modules/mono/csharp_script.h
+++ b/modules/mono/csharp_script.h
@@ -170,7 +170,7 @@ private:
static int _try_get_member_export_hint(IMonoClassMember *p_member, ManagedType p_type, Variant::Type p_variant_type, bool p_allow_generics, PropertyHint &r_hint, String &r_hint_string);
#endif
- CSharpInstance *_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_isref, Callable::CallError &r_error);
+ CSharpInstance *_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_is_ref_counted, Callable::CallError &r_error);
Variant _new(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
// Do not use unless you know what you are doing
@@ -251,7 +251,7 @@ class CSharpInstance : public ScriptInstance {
friend class CSharpLanguage;
Object *owner = nullptr;
- bool base_ref = false;
+ bool base_ref_counted = false;
bool ref_dying = false;
bool unsafe_referenced = false;
bool predelete_notified = false;
diff --git a/modules/mono/editor/GodotTools/GodotTools/Build/BuildInfo.cs b/modules/mono/editor/GodotTools/GodotTools/Build/BuildInfo.cs
index 51055dc9b9..27737c3da0 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Build/BuildInfo.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Build/BuildInfo.cs
@@ -7,7 +7,7 @@ using Path = System.IO.Path;
namespace GodotTools.Build
{
[Serializable]
- public sealed class BuildInfo : Reference // TODO Remove Reference once we have proper serialization
+ public sealed class BuildInfo : RefCounted // TODO Remove RefCounted once we have proper serialization
{
public string Solution { get; }
public string[] Targets { get; }
diff --git a/modules/mono/editor/GodotTools/GodotTools/Build/BuildOutputView.cs b/modules/mono/editor/GodotTools/GodotTools/Build/BuildOutputView.cs
index 1a1639aac7..c380707587 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Build/BuildOutputView.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Build/BuildOutputView.cs
@@ -11,7 +11,7 @@ namespace GodotTools.Build
public class BuildOutputView : VBoxContainer, ISerializationListener
{
[Serializable]
- private class BuildIssue : Reference // TODO Remove Reference once we have proper serialization
+ private class BuildIssue : RefCounted // TODO Remove RefCounted once we have proper serialization
{
public bool Warning { get; set; }
public string File { get; set; }
diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp
index adf19cfb8c..b6bff58610 100644
--- a/modules/mono/editor/bindings_generator.cpp
+++ b/modules/mono/editor/bindings_generator.cpp
@@ -1260,7 +1260,7 @@ Error BindingsGenerator::_generate_cs_type(const TypeInterface &itype, const Str
CRASH_COND(itype.cname != name_cache.type_Object);
CRASH_COND(!itype.is_instantiable);
CRASH_COND(itype.api_type != ClassDB::API_CORE);
- CRASH_COND(itype.is_reference);
+ CRASH_COND(itype.is_ref_counted);
CRASH_COND(itype.is_singleton);
}
@@ -2284,8 +2284,8 @@ Error BindingsGenerator::_generate_glue_method(const BindingsGenerator::TypeInte
}
if (return_type->is_object_type) {
- ptrcall_return_type = return_type->is_reference ? "Ref<Reference>" : return_type->c_type;
- initialization = return_type->is_reference ? "" : " = nullptr";
+ ptrcall_return_type = return_type->is_ref_counted ? "Ref<RefCounted>" : return_type->c_type;
+ initialization = return_type->is_ref_counted ? "" : " = nullptr";
} else {
ptrcall_return_type = return_type->c_type;
}
@@ -2600,12 +2600,12 @@ bool BindingsGenerator::_populate_object_type_interfaces() {
itype.base_name = ClassDB::get_parent_class(type_cname);
itype.is_singleton = Engine::get_singleton()->has_singleton(itype.proxy_name);
itype.is_instantiable = class_info->creation_func && !itype.is_singleton;
- itype.is_reference = ClassDB::is_parent_class(type_cname, name_cache.type_Reference);
- itype.memory_own = itype.is_reference;
+ itype.is_ref_counted = ClassDB::is_parent_class(type_cname, name_cache.type_RefCounted);
+ itype.memory_own = itype.is_ref_counted;
itype.c_out = "\treturn ";
itype.c_out += C_METHOD_UNMANAGED_GET_MANAGED;
- itype.c_out += itype.is_reference ? "(%1.ptr());\n" : "(%1);\n";
+ itype.c_out += itype.is_ref_counted ? "(%1.ptr());\n" : "(%1);\n";
itype.cs_in = itype.is_singleton ? BINDINGS_PTR_FIELD : "Object." CS_SMETHOD_GETINSTANCE "(%0)";
@@ -2741,7 +2741,7 @@ bool BindingsGenerator::_populate_object_type_interfaces() {
imethod.return_type.cname = return_info.class_name;
bool bad_reference_hint = !imethod.is_virtual && return_info.hint != PROPERTY_HINT_RESOURCE_TYPE &&
- ClassDB::is_parent_class(return_info.class_name, name_cache.type_Reference);
+ ClassDB::is_parent_class(return_info.class_name, name_cache.type_RefCounted);
ERR_FAIL_COND_V_MSG(bad_reference_hint, false,
String() + "Return type is reference but hint is not '" _STR(PROPERTY_HINT_RESOURCE_TYPE) "'." +
" Are you returning a reference type by pointer? Method: '" + itype.name + "." + imethod.name + "'.");
diff --git a/modules/mono/editor/bindings_generator.h b/modules/mono/editor/bindings_generator.h
index 876046176b..48c0e02723 100644
--- a/modules/mono/editor/bindings_generator.h
+++ b/modules/mono/editor/bindings_generator.h
@@ -216,7 +216,7 @@ class BindingsGenerator {
bool is_enum = false;
bool is_object_type = false;
bool is_singleton = false;
- bool is_reference = false;
+ bool is_ref_counted = false;
/**
* Used only by Object-derived types.
@@ -228,7 +228,7 @@ class BindingsGenerator {
/**
* Used only by Object-derived types.
* Determines if the C# class owns the native handle and must free it somehow when disposed.
- * e.g.: Reference types must notify when the C# instance is disposed, for proper refcounting.
+ * e.g.: RefCounted types must notify when the C# instance is disposed, for proper refcounting.
*/
bool memory_own = false;
@@ -295,7 +295,7 @@ class BindingsGenerator {
* VarArg (fictitious type to represent variable arguments): Array
* float: double (because ptrcall only supports double)
* int: int64_t (because ptrcall only supports int64_t and uint64_t)
- * Reference types override this for the type of the return variable: Ref<Reference>
+ * RefCounted types override this for the type of the return variable: Ref<RefCounted>
*/
String c_type;
@@ -534,7 +534,7 @@ class BindingsGenerator {
StringName type_Variant = StaticCString::create("Variant");
StringName type_VarArg = StaticCString::create("VarArg");
StringName type_Object = StaticCString::create("Object");
- StringName type_Reference = StaticCString::create("Reference");
+ StringName type_RefCounted = StaticCString::create("RefCounted");
StringName type_RID = StaticCString::create("RID");
StringName type_String = StaticCString::create("String");
StringName type_StringName = StaticCString::create("StringName");
@@ -623,7 +623,7 @@ class BindingsGenerator {
}
inline String get_unique_sig(const TypeInterface &p_type) {
- if (p_type.is_reference) {
+ if (p_type.is_ref_counted) {
return "Ref";
} else if (p_type.is_object_type) {
return "Obj";
diff --git a/modules/mono/glue/base_object_glue.cpp b/modules/mono/glue/base_object_glue.cpp
index 34a96eba17..c1b50b9951 100644
--- a/modules/mono/glue/base_object_glue.cpp
+++ b/modules/mono/glue/base_object_glue.cpp
@@ -31,7 +31,7 @@
#ifdef MONO_GLUE_ENABLED
#include "core/object/class_db.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/string/string_name.h"
#include "../csharp_script.h"
@@ -81,13 +81,13 @@ void godot_icall_Object_Disposed(MonoObject *p_obj, Object *p_ptr) {
void godot_icall_Reference_Disposed(MonoObject *p_obj, Object *p_ptr, MonoBoolean p_is_finalizer) {
#ifdef DEBUG_ENABLED
CRASH_COND(p_ptr == nullptr);
- // This is only called with Reference derived classes
- CRASH_COND(!Object::cast_to<Reference>(p_ptr));
+ // This is only called with RefCounted derived classes
+ CRASH_COND(!Object::cast_to<RefCounted>(p_ptr));
#endif
- Reference *ref = static_cast<Reference *>(p_ptr);
+ RefCounted *rc = static_cast<RefCounted *>(p_ptr);
- if (ref->get_script_instance()) {
+ if (rc->get_script_instance()) {
CSharpInstance *cs_instance = CAST_CSHARP_INSTANCE(ref->get_script_instance());
if (cs_instance) {
if (!cs_instance->is_destructing_script_instance()) {
@@ -97,9 +97,9 @@ void godot_icall_Reference_Disposed(MonoObject *p_obj, Object *p_ptr, MonoBoolea
cs_instance->mono_object_disposed_baseref(p_obj, p_is_finalizer, delete_owner, remove_script_instance);
if (delete_owner) {
- memdelete(ref);
+ memdelete(rc);
} else if (remove_script_instance) {
- ref->set_script_instance(nullptr);
+ rc->set_script_instance(nullptr);
}
}
return;
@@ -145,10 +145,10 @@ MonoObject *godot_icall_Object_weakref(Object *p_ptr) {
}
Ref<WeakRef> wref;
- Reference *ref = Object::cast_to<Reference>(p_ptr);
+ RefCounted *rc = Object::cast_to<RefCounted>(p_ptr);
- if (ref) {
- REF r = ref;
+ if (rc) {
+ REF r = rc;
if (!r.is_valid()) {
return nullptr;
}
diff --git a/modules/mono/glue/glue_header.h b/modules/mono/glue/glue_header.h
index 3db52d7c30..eed3bd2167 100644
--- a/modules/mono/glue/glue_header.h
+++ b/modules/mono/glue/glue_header.h
@@ -61,7 +61,7 @@ void godot_register_glue_header_icalls() {
#include "core/config/engine.h"
#include "core/object/class_db.h"
#include "core/object/method_bind.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/string/node_path.h"
#include "core/string/ustring.h"
#include "core/typedefs.h"
diff --git a/modules/mono/mono_gc_handle.h b/modules/mono/mono_gc_handle.h
index f435aab3dd..d0e51d159f 100644
--- a/modules/mono/mono_gc_handle.h
+++ b/modules/mono/mono_gc_handle.h
@@ -33,7 +33,7 @@
#include <mono/jit/jit.h>
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
namespace gdmono {
@@ -79,8 +79,8 @@ struct MonoGCHandleData {
static MonoGCHandleData new_weak_handle(MonoObject *p_object);
};
-class MonoGCHandleRef : public Reference {
- GDCLASS(MonoGCHandleRef, Reference);
+class MonoGCHandleRef : public RefCounted {
+ GDCLASS(MonoGCHandleRef, RefCounted);
MonoGCHandleData data;
diff --git a/modules/mono/mono_gd/gd_mono_internals.cpp b/modules/mono/mono_gd/gd_mono_internals.cpp
index fa93c6533a..65fb23b128 100644
--- a/modules/mono/mono_gd/gd_mono_internals.cpp
+++ b/modules/mono/mono_gd/gd_mono_internals.cpp
@@ -51,7 +51,7 @@ void tie_managed_to_unmanaged(MonoObject *managed, Object *unmanaged) {
// All mono objects created from the managed world (e.g.: 'new Player()')
// need to have a CSharpScript in order for their methods to be callable from the unmanaged side
- Reference *ref = Object::cast_to<Reference>(unmanaged);
+ RefCounted *rc = Object::cast_to<RefCounted>(unmanaged);
GDMonoClass *klass = GDMonoUtils::get_object_class(managed);
@@ -73,18 +73,18 @@ void tie_managed_to_unmanaged(MonoObject *managed, Object *unmanaged) {
script_binding.inited = true;
script_binding.type_name = NATIVE_GDMONOCLASS_NAME(klass);
script_binding.wrapper_class = klass;
- script_binding.gchandle = ref ? MonoGCHandleData::new_weak_handle(managed) : MonoGCHandleData::new_strong_handle(managed);
+ script_binding.gchandle = rc ? MonoGCHandleData::new_weak_handle(managed) : MonoGCHandleData::new_strong_handle(managed);
script_binding.owner = unmanaged;
- if (ref) {
+ if (rc) {
// Unsafe refcount increment. The managed instance also counts as a reference.
// This way if the unmanaged world has no references to our owner
// but the managed instance is alive, the refcount will be 1 instead of 0.
// See: godot_icall_Reference_Dtor(MonoObject *p_obj, Object *p_ptr)
// May not me referenced yet, so we must use init_ref() instead of reference()
- if (ref->init_ref()) {
- CSharpLanguage::get_singleton()->post_unsafe_reference(ref);
+ if (rc->init_ref()) {
+ CSharpLanguage::get_singleton()->post_unsafe_reference(rc);
}
}
@@ -99,7 +99,7 @@ void tie_managed_to_unmanaged(MonoObject *managed, Object *unmanaged) {
return;
}
- MonoGCHandleData gchandle = ref ? MonoGCHandleData::new_weak_handle(managed) : MonoGCHandleData::new_strong_handle(managed);
+ MonoGCHandleData gchandle = rc ? MonoGCHandleData::new_weak_handle(managed) : MonoGCHandleData::new_strong_handle(managed);
Ref<CSharpScript> script = CSharpScript::create_for_managed_type(klass, native);
diff --git a/modules/mono/mono_gd/gd_mono_marshal.cpp b/modules/mono/mono_gd/gd_mono_marshal.cpp
index c8f80e7777..9f2977bfa2 100644
--- a/modules/mono/mono_gd/gd_mono_marshal.cpp
+++ b/modules/mono/mono_gd/gd_mono_marshal.cpp
@@ -1136,8 +1136,8 @@ Variant mono_object_to_variant_impl(MonoObject *p_obj, const ManagedType &p_type
if (CACHED_CLASS(GodotObject)->is_assignable_from(type_class)) {
Object *ptr = unbox<Object *>(CACHED_FIELD(GodotObject, ptr)->get_value(p_obj));
if (ptr != nullptr) {
- Reference *ref = Object::cast_to<Reference>(ptr);
- return ref ? Variant(Ref<Reference>(ref)) : Variant(ptr);
+ RefCounted *rc = Object::cast_to<RefCounted>(ptr);
+ return rc ? Variant(Ref<RefCounted>(rc)) : Variant(ptr);
}
return Variant();
}
diff --git a/modules/mono/mono_gd/gd_mono_utils.cpp b/modules/mono/mono_gd/gd_mono_utils.cpp
index 52bdc6ff01..cf2859c319 100644
--- a/modules/mono/mono_gd/gd_mono_utils.cpp
+++ b/modules/mono/mono_gd/gd_mono_utils.cpp
@@ -36,7 +36,7 @@
#include "core/debugger/engine_debugger.h"
#include "core/debugger/script_debugger.h"
#include "core/io/dir_access.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/os/mutex.h"
#include "core/os/os.h"
@@ -108,15 +108,15 @@ MonoObject *unmanaged_get_managed(Object *unmanaged) {
gchandle = MonoGCHandleData::new_strong_handle(mono_object);
// Tie managed to unmanaged
- Reference *ref = Object::cast_to<Reference>(unmanaged);
+ RefCounted *rc = Object::cast_to<RefCounted>(unmanaged);
- if (ref) {
+ if (rc) {
// Unsafe refcount increment. The managed instance also counts as a reference.
// This way if the unmanaged world has no references to our owner
// but the managed instance is alive, the refcount will be 1 instead of 0.
// See: godot_icall_Reference_Dtor(MonoObject *p_obj, Object *p_ptr)
- ref->reference();
- CSharpLanguage::get_singleton()->post_unsafe_reference(ref);
+ rc->reference();
+ CSharpLanguage::get_singleton()->post_unsafe_reference(rc);
}
return mono_object;
diff --git a/modules/mono/mono_gd/gd_mono_utils.h b/modules/mono/mono_gd/gd_mono_utils.h
index 9e024418e1..773501e93d 100644
--- a/modules/mono/mono_gd/gd_mono_utils.h
+++ b/modules/mono/mono_gd/gd_mono_utils.h
@@ -41,7 +41,7 @@
#endif
#include "core/object/class_db.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#define UNHANDLED_EXCEPTION(m_exc) \
if (unlikely(m_exc != nullptr)) { \
diff --git a/modules/mono/signal_awaiter_utils.h b/modules/mono/signal_awaiter_utils.h
index 4c77f8cfed..e12ea45b3f 100644
--- a/modules/mono/signal_awaiter_utils.h
+++ b/modules/mono/signal_awaiter_utils.h
@@ -31,7 +31,7 @@
#ifndef SIGNAL_AWAITER_UTILS_H
#define SIGNAL_AWAITER_UTILS_H
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "csharp_script.h"
#include "mono_gc_handle.h"
diff --git a/modules/opensimplex/noise_texture.h b/modules/opensimplex/noise_texture.h
index 20a53bb58b..6237b6460d 100644
--- a/modules/opensimplex/noise_texture.h
+++ b/modules/opensimplex/noise_texture.h
@@ -34,7 +34,7 @@
#include "open_simplex_noise.h"
#include "core/io/image.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "editor/property_editor.h"
diff --git a/modules/opensimplex/open_simplex_noise.h b/modules/opensimplex/open_simplex_noise.h
index bb50c523d2..dcf922a8bf 100644
--- a/modules/opensimplex/open_simplex_noise.h
+++ b/modules/opensimplex/open_simplex_noise.h
@@ -32,7 +32,7 @@
#define OPEN_SIMPLEX_NOISE_H
#include "core/io/image.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "scene/resources/texture.h"
#include "thirdparty/misc/open-simplex-noise.h"
diff --git a/modules/pvr/image_compress_pvrtc.cpp b/modules/pvr/image_compress_pvrtc.cpp
index 6cb9837f49..4d0430fa92 100644
--- a/modules/pvr/image_compress_pvrtc.cpp
+++ b/modules/pvr/image_compress_pvrtc.cpp
@@ -31,7 +31,7 @@
#include "image_compress_pvrtc.h"
#include "core/io/image.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include <PvrTcEncoder.h>
#include <RgbaBitmap.h>
diff --git a/modules/raycast/raycast_occlusion_cull.h b/modules/raycast/raycast_occlusion_cull.h
index d9ca57cf24..85710a790c 100644
--- a/modules/raycast/raycast_occlusion_cull.h
+++ b/modules/raycast/raycast_occlusion_cull.h
@@ -34,7 +34,7 @@
#include "core/io/image.h"
#include "core/math/camera_matrix.h"
#include "core/object/object.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/templates/local_vector.h"
#include "core/templates/rid_owner.h"
#include "scene/resources/mesh.h"
diff --git a/modules/regex/doc_classes/RegEx.xml b/modules/regex/doc_classes/RegEx.xml
index b21f5d1e7a..7f5a0dfecb 100644
--- a/modules/regex/doc_classes/RegEx.xml
+++ b/modules/regex/doc_classes/RegEx.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RegEx" inherits="Reference" version="4.0">
+<class name="RegEx" inherits="RefCounted" version="4.0">
<brief_description>
Class for searching text for patterns using regular expressions.
</brief_description>
diff --git a/modules/regex/doc_classes/RegExMatch.xml b/modules/regex/doc_classes/RegExMatch.xml
index a45de60aef..cfe00f83ee 100644
--- a/modules/regex/doc_classes/RegExMatch.xml
+++ b/modules/regex/doc_classes/RegExMatch.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RegExMatch" inherits="Reference" version="4.0">
+<class name="RegExMatch" inherits="RefCounted" version="4.0">
<brief_description>
Contains the results of a [RegEx] search.
</brief_description>
diff --git a/modules/regex/regex.h b/modules/regex/regex.h
index f5773042fb..68fe2bc6e0 100644
--- a/modules/regex/regex.h
+++ b/modules/regex/regex.h
@@ -31,15 +31,15 @@
#ifndef REGEX_H
#define REGEX_H
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/string/ustring.h"
#include "core/templates/map.h"
#include "core/templates/vector.h"
#include "core/variant/array.h"
#include "core/variant/dictionary.h"
-class RegExMatch : public Reference {
- GDCLASS(RegExMatch, Reference);
+class RegExMatch : public RefCounted {
+ GDCLASS(RegExMatch, RefCounted);
struct Range {
int start = 0;
@@ -68,8 +68,8 @@ public:
int get_end(const Variant &p_name) const;
};
-class RegEx : public Reference {
- GDCLASS(RegEx, Reference);
+class RegEx : public RefCounted {
+ GDCLASS(RegEx, RefCounted);
void *general_ctx;
void *code = nullptr;
diff --git a/modules/upnp/doc_classes/UPNP.xml b/modules/upnp/doc_classes/UPNP.xml
index 785c8dad50..09a2c8a88c 100644
--- a/modules/upnp/doc_classes/UPNP.xml
+++ b/modules/upnp/doc_classes/UPNP.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="UPNP" inherits="Reference" version="4.0">
+<class name="UPNP" inherits="RefCounted" version="4.0">
<brief_description>
UPNP network functions.
</brief_description>
diff --git a/modules/upnp/doc_classes/UPNPDevice.xml b/modules/upnp/doc_classes/UPNPDevice.xml
index f3b96bb89d..f7b5386d86 100644
--- a/modules/upnp/doc_classes/UPNPDevice.xml
+++ b/modules/upnp/doc_classes/UPNPDevice.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="UPNPDevice" inherits="Reference" version="4.0">
+<class name="UPNPDevice" inherits="RefCounted" version="4.0">
<brief_description>
UPNP device.
</brief_description>
diff --git a/modules/upnp/upnp.h b/modules/upnp/upnp.h
index a0cca96bc8..b961a9667f 100644
--- a/modules/upnp/upnp.h
+++ b/modules/upnp/upnp.h
@@ -31,14 +31,14 @@
#ifndef GODOT_UPNP_H
#define GODOT_UPNP_H
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "upnp_device.h"
#include <miniupnpc/miniupnpc.h>
-class UPNP : public Reference {
- GDCLASS(UPNP, Reference);
+class UPNP : public RefCounted {
+ GDCLASS(UPNP, RefCounted);
private:
String discover_multicast_if = "";
diff --git a/modules/upnp/upnp_device.h b/modules/upnp/upnp_device.h
index 126e761a56..0a66c36ab9 100644
--- a/modules/upnp/upnp_device.h
+++ b/modules/upnp/upnp_device.h
@@ -31,10 +31,10 @@
#ifndef GODOT_UPNP_DEVICE_H
#define GODOT_UPNP_DEVICE_H
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
-class UPNPDevice : public Reference {
- GDCLASS(UPNPDevice, Reference);
+class UPNPDevice : public RefCounted {
+ GDCLASS(UPNPDevice, RefCounted);
public:
enum IGDStatus {
diff --git a/modules/visual_script/doc_classes/VisualScriptFunctionState.xml b/modules/visual_script/doc_classes/VisualScriptFunctionState.xml
index 68083614a6..f5bf195bbf 100644
--- a/modules/visual_script/doc_classes/VisualScriptFunctionState.xml
+++ b/modules/visual_script/doc_classes/VisualScriptFunctionState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptFunctionState" inherits="Reference" version="4.0">
+<class name="VisualScriptFunctionState" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/visual_script.h b/modules/visual_script/visual_script.h
index 3c4a26a2a3..438ec99a56 100644
--- a/modules/visual_script/visual_script.h
+++ b/modules/visual_script/visual_script.h
@@ -449,8 +449,8 @@ public:
~VisualScriptInstance();
};
-class VisualScriptFunctionState : public Reference {
- GDCLASS(VisualScriptFunctionState, Reference);
+class VisualScriptFunctionState : public RefCounted {
+ GDCLASS(VisualScriptFunctionState, RefCounted);
friend class VisualScriptInstance;
ObjectID instance_id;
diff --git a/modules/visual_script/visual_script_builtin_funcs.cpp b/modules/visual_script/visual_script_builtin_funcs.cpp
index df34ec22ce..a3133f126d 100644
--- a/modules/visual_script/visual_script_builtin_funcs.cpp
+++ b/modules/visual_script/visual_script_builtin_funcs.cpp
@@ -33,7 +33,7 @@
#include "core/io/marshalls.h"
#include "core/math/math_funcs.h"
#include "core/object/class_db.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/os/os.h"
#include "core/variant/variant_parser.h"
diff --git a/modules/webrtc/doc_classes/WebRTCPeerConnection.xml b/modules/webrtc/doc_classes/WebRTCPeerConnection.xml
index 3b53892a3d..62e524825d 100644
--- a/modules/webrtc/doc_classes/WebRTCPeerConnection.xml
+++ b/modules/webrtc/doc_classes/WebRTCPeerConnection.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WebRTCPeerConnection" inherits="Reference" version="4.0">
+<class name="WebRTCPeerConnection" inherits="RefCounted" version="4.0">
<brief_description>
Interface to a WebRTC peer connection.
</brief_description>
diff --git a/modules/webrtc/webrtc_multiplayer.h b/modules/webrtc/webrtc_multiplayer.h
index 6b4ae6fcc8..2ddb98f656 100644
--- a/modules/webrtc/webrtc_multiplayer.h
+++ b/modules/webrtc/webrtc_multiplayer.h
@@ -48,7 +48,7 @@ private:
CH_RESERVED_MAX = 3
};
- class ConnectedPeer : public Reference {
+ class ConnectedPeer : public RefCounted {
public:
Ref<WebRTCPeerConnection> connection;
List<Ref<WebRTCDataChannel>> channels;
diff --git a/modules/webrtc/webrtc_peer_connection.h b/modules/webrtc/webrtc_peer_connection.h
index ae75864489..fcfb9ae9ae 100644
--- a/modules/webrtc/webrtc_peer_connection.h
+++ b/modules/webrtc/webrtc_peer_connection.h
@@ -34,8 +34,8 @@
#include "core/io/packet_peer.h"
#include "modules/webrtc/webrtc_data_channel.h"
-class WebRTCPeerConnection : public Reference {
- GDCLASS(WebRTCPeerConnection, Reference);
+class WebRTCPeerConnection : public RefCounted {
+ GDCLASS(WebRTCPeerConnection, RefCounted);
public:
enum ConnectionState {
diff --git a/modules/websocket/emws_server.h b/modules/websocket/emws_server.h
index e7285ccb86..d36e3a3557 100644
--- a/modules/websocket/emws_server.h
+++ b/modules/websocket/emws_server.h
@@ -33,7 +33,7 @@
#ifdef JAVASCRIPT_ENABLED
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "emws_peer.h"
#include "websocket_server.h"
diff --git a/modules/websocket/websocket_server.h b/modules/websocket/websocket_server.h
index 10da51fce5..bc5e591e7b 100644
--- a/modules/websocket/websocket_server.h
+++ b/modules/websocket/websocket_server.h
@@ -32,7 +32,7 @@
#define WEBSOCKET_H
#include "core/crypto/crypto.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "websocket_multiplayer_peer.h"
#include "websocket_peer.h"
diff --git a/modules/websocket/wsl_server.h b/modules/websocket/wsl_server.h
index c2cf9df58b..39177a16a8 100644
--- a/modules/websocket/wsl_server.h
+++ b/modules/websocket/wsl_server.h
@@ -46,7 +46,7 @@ class WSLServer : public WebSocketServer {
GDCIIMPL(WSLServer, WebSocketServer);
private:
- class PendingPeer : public Reference {
+ class PendingPeer : public RefCounted {
private:
bool _parse_request(const Vector<String> p_protocols);
diff --git a/platform/android/api/java_class_wrapper.h b/platform/android/api/java_class_wrapper.h
index d6c7a1abe5..ff7bf43573 100644
--- a/platform/android/api/java_class_wrapper.h
+++ b/platform/android/api/java_class_wrapper.h
@@ -31,7 +31,7 @@
#ifndef JAVA_CLASS_WRAPPER_H
#define JAVA_CLASS_WRAPPER_H
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#ifdef ANDROID_ENABLED
#include <android/log.h>
@@ -42,8 +42,8 @@
class JavaObject;
#endif
-class JavaClass : public Reference {
- GDCLASS(JavaClass, Reference);
+class JavaClass : public RefCounted {
+ GDCLASS(JavaClass, RefCounted);
#ifdef ANDROID_ENABLED
enum ArgumentType{
@@ -184,8 +184,8 @@ public:
JavaClass();
};
-class JavaObject : public Reference {
- GDCLASS(JavaObject, Reference);
+class JavaObject : public RefCounted {
+ GDCLASS(JavaObject, RefCounted);
#ifdef ANDROID_ENABLED
Ref<JavaClass> base_class;
diff --git a/platform/android/java_class_wrapper.cpp b/platform/android/java_class_wrapper.cpp
index f49b0e843a..ed6b5c3e14 100644
--- a/platform/android/java_class_wrapper.cpp
+++ b/platform/android/java_class_wrapper.cpp
@@ -102,7 +102,7 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method,
if (p_args[i]->get_type() != Variant::OBJECT)
arg_expected = Variant::OBJECT;
else {
- Ref<Reference> ref = *p_args[i];
+ Ref<RefCounted> ref = *p_args[i];
if (!ref.is_null()) {
if (Object::cast_to<JavaObject>(ref.ptr())) {
Ref<JavaObject> jo = ref;
@@ -488,7 +488,7 @@ Variant JavaClass::call(const StringName &p_method, const Variant **p_args, int
return ret;
}
- return Reference::call(p_method, p_args, p_argcount, r_error);
+ return RefCounted::call(p_method, p_args, p_argcount, r_error);
}
JavaClass::JavaClass() {
diff --git a/platform/javascript/api/javascript_singleton.h b/platform/javascript/api/javascript_singleton.h
index 1615efa87e..9d7a392278 100644
--- a/platform/javascript/api/javascript_singleton.h
+++ b/platform/javascript/api/javascript_singleton.h
@@ -32,11 +32,11 @@
#define JAVASCRIPT_SINGLETON_H
#include "core/object/class_db.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
-class JavaScriptObject : public Reference {
+class JavaScriptObject : public RefCounted {
private:
- GDCLASS(JavaScriptObject, Reference);
+ GDCLASS(JavaScriptObject, RefCounted);
protected:
virtual bool _set(const StringName &p_name, const Variant &p_value) { return false; }
diff --git a/platform/javascript/export/export.cpp b/platform/javascript/export/export.cpp
index 8ce294f31b..7e49feee61 100644
--- a/platform/javascript/export/export.cpp
+++ b/platform/javascript/export/export.cpp
@@ -39,7 +39,7 @@
#include "platform/javascript/logo.gen.h"
#include "platform/javascript/run_icon.gen.h"
-class EditorHTTPServer : public Reference {
+class EditorHTTPServer : public RefCounted {
private:
Ref<TCPServer> server;
Map<String, String> mimes;
diff --git a/scene/2d/physics_body_2d.h b/scene/2d/physics_body_2d.h
index cd39a1996c..423f792132 100644
--- a/scene/2d/physics_body_2d.h
+++ b/scene/2d/physics_body_2d.h
@@ -338,8 +338,8 @@ public:
~CharacterBody2D();
};
-class KinematicCollision2D : public Reference {
- GDCLASS(KinematicCollision2D, Reference);
+class KinematicCollision2D : public RefCounted {
+ GDCLASS(KinematicCollision2D, RefCounted);
PhysicsBody2D *owner = nullptr;
friend class PhysicsBody2D;
diff --git a/scene/3d/lightmapper.h b/scene/3d/lightmapper.h
index f63515f666..3a6a88d435 100644
--- a/scene/3d/lightmapper.h
+++ b/scene/3d/lightmapper.h
@@ -44,8 +44,8 @@
#endif
-class LightmapDenoiser : public Reference {
- GDCLASS(LightmapDenoiser, Reference)
+class LightmapDenoiser : public RefCounted {
+ GDCLASS(LightmapDenoiser, RefCounted)
protected:
static LightmapDenoiser *(*create_function)();
@@ -54,8 +54,8 @@ public:
static Ref<LightmapDenoiser> create();
};
-class LightmapRaycaster : public Reference {
- GDCLASS(LightmapRaycaster, Reference)
+class LightmapRaycaster : public RefCounted {
+ GDCLASS(LightmapRaycaster, RefCounted)
protected:
static LightmapRaycaster *(*create_function)();
@@ -121,8 +121,8 @@ public:
static Ref<LightmapRaycaster> create();
};
-class Lightmapper : public Reference {
- GDCLASS(Lightmapper, Reference)
+class Lightmapper : public RefCounted {
+ GDCLASS(Lightmapper, RefCounted)
public:
enum GenerateProbes {
GENERATE_PROBES_DISABLED,
diff --git a/scene/3d/node_3d.h b/scene/3d/node_3d.h
index 09a96bf8ca..5f076ceb12 100644
--- a/scene/3d/node_3d.h
+++ b/scene/3d/node_3d.h
@@ -34,8 +34,8 @@
#include "scene/main/node.h"
#include "scene/main/scene_tree.h"
-class Node3DGizmo : public Reference {
- GDCLASS(Node3DGizmo, Reference);
+class Node3DGizmo : public RefCounted {
+ GDCLASS(Node3DGizmo, RefCounted);
public:
virtual void create() = 0;
diff --git a/scene/3d/physics_body_3d.h b/scene/3d/physics_body_3d.h
index a25cb06bc3..8df3635be0 100644
--- a/scene/3d/physics_body_3d.h
+++ b/scene/3d/physics_body_3d.h
@@ -339,8 +339,8 @@ public:
~CharacterBody3D();
};
-class KinematicCollision3D : public Reference {
- GDCLASS(KinematicCollision3D, Reference);
+class KinematicCollision3D : public RefCounted {
+ GDCLASS(KinematicCollision3D, RefCounted);
PhysicsBody3D *owner = nullptr;
friend class PhysicsBody3D;
diff --git a/scene/3d/skeleton_3d.h b/scene/3d/skeleton_3d.h
index 9be7dce5d2..2f6e416c8c 100644
--- a/scene/3d/skeleton_3d.h
+++ b/scene/3d/skeleton_3d.h
@@ -40,8 +40,8 @@ typedef int BoneId;
class PhysicalBone3D;
class Skeleton3D;
-class SkinReference : public Reference {
- GDCLASS(SkinReference, Reference)
+class SkinReference : public RefCounted {
+ GDCLASS(SkinReference, RefCounted)
friend class Skeleton3D;
Skeleton3D *skeleton_node;
diff --git a/scene/3d/velocity_tracker_3d.h b/scene/3d/velocity_tracker_3d.h
index e971f4755a..827c3f5bd8 100644
--- a/scene/3d/velocity_tracker_3d.h
+++ b/scene/3d/velocity_tracker_3d.h
@@ -33,8 +33,8 @@
#include "scene/3d/node_3d.h"
-class VelocityTracker3D : public Reference {
- GDCLASS(VelocityTracker3D, Reference);
+class VelocityTracker3D : public RefCounted {
+ GDCLASS(VelocityTracker3D, RefCounted);
struct PositionHistory {
uint64_t frame = 0;
diff --git a/scene/animation/animation_player.h b/scene/animation/animation_player.h
index 7922635438..7cd9de1fa1 100644
--- a/scene/animation/animation_player.h
+++ b/scene/animation/animation_player.h
@@ -37,8 +37,8 @@
#include "scene/resources/animation.h"
#ifdef TOOLS_ENABLED
-class AnimatedValuesBackup : public Reference {
- GDCLASS(AnimatedValuesBackup, Reference);
+class AnimatedValuesBackup : public RefCounted {
+ GDCLASS(AnimatedValuesBackup, RefCounted);
struct Entry {
Object *object = nullptr;
diff --git a/scene/gui/rich_text_effect.h b/scene/gui/rich_text_effect.h
index f2e2823eff..d809fd502f 100644
--- a/scene/gui/rich_text_effect.h
+++ b/scene/gui/rich_text_effect.h
@@ -47,8 +47,8 @@ public:
RichTextEffect();
};
-class CharFXTransform : public Reference {
- GDCLASS(CharFXTransform, Reference);
+class CharFXTransform : public RefCounted {
+ GDCLASS(CharFXTransform, RefCounted);
protected:
static void _bind_methods();
diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h
index a2f2adb8f8..78c4c14e97 100644
--- a/scene/main/scene_tree.h
+++ b/scene/main/scene_tree.h
@@ -48,8 +48,8 @@ class Material;
class Mesh;
class SceneDebugger;
-class SceneTreeTimer : public Reference {
- GDCLASS(SceneTreeTimer, Reference);
+class SceneTreeTimer : public RefCounted {
+ GDCLASS(SceneTreeTimer, RefCounted);
float time_left = 0.0;
bool process_always = true;
diff --git a/scene/resources/mesh_data_tool.h b/scene/resources/mesh_data_tool.h
index f5c8f11437..b0ebfba7ee 100644
--- a/scene/resources/mesh_data_tool.h
+++ b/scene/resources/mesh_data_tool.h
@@ -33,8 +33,8 @@
#include "scene/resources/mesh.h"
-class MeshDataTool : public Reference {
- GDCLASS(MeshDataTool, Reference);
+class MeshDataTool : public RefCounted {
+ GDCLASS(MeshDataTool, RefCounted);
int format = 0;
struct Vertex {
diff --git a/scene/resources/packed_scene.h b/scene/resources/packed_scene.h
index 78a0aeaa9a..e85b933439 100644
--- a/scene/resources/packed_scene.h
+++ b/scene/resources/packed_scene.h
@@ -34,8 +34,8 @@
#include "core/io/resource.h"
#include "scene/main/node.h"
-class SceneState : public Reference {
- GDCLASS(SceneState, Reference);
+class SceneState : public RefCounted {
+ GDCLASS(SceneState, RefCounted);
Vector<StringName> names;
Vector<Variant> variants;
diff --git a/scene/resources/surface_tool.h b/scene/resources/surface_tool.h
index 4674f0cc69..bde6702759 100644
--- a/scene/resources/surface_tool.h
+++ b/scene/resources/surface_tool.h
@@ -35,8 +35,8 @@
#include "scene/resources/mesh.h"
#include "thirdparty/misc/mikktspace.h"
-class SurfaceTool : public Reference {
- GDCLASS(SurfaceTool, Reference);
+class SurfaceTool : public RefCounted {
+ GDCLASS(SurfaceTool, RefCounted);
public:
struct Vertex {
diff --git a/scene/resources/text_line.h b/scene/resources/text_line.h
index 74d4f2c32c..1b5c1a3123 100644
--- a/scene/resources/text_line.h
+++ b/scene/resources/text_line.h
@@ -36,8 +36,8 @@
/*************************************************************************/
-class TextLine : public Reference {
- GDCLASS(TextLine, Reference);
+class TextLine : public RefCounted {
+ GDCLASS(TextLine, RefCounted);
RID rid;
int spacing_top = 0;
diff --git a/scene/resources/text_paragraph.h b/scene/resources/text_paragraph.h
index 4396b07130..a34e745090 100644
--- a/scene/resources/text_paragraph.h
+++ b/scene/resources/text_paragraph.h
@@ -36,8 +36,8 @@
/*************************************************************************/
-class TextParagraph : public Reference {
- GDCLASS(TextParagraph, Reference);
+class TextParagraph : public RefCounted {
+ GDCLASS(TextParagraph, RefCounted);
RID dropcap_rid;
int dropcap_lines = 0;
diff --git a/servers/audio/audio_effect.h b/servers/audio/audio_effect.h
index 4556db9b93..5d14f03199 100644
--- a/servers/audio/audio_effect.h
+++ b/servers/audio/audio_effect.h
@@ -34,8 +34,8 @@
#include "core/io/resource.h"
#include "core/math/audio_frame.h"
-class AudioEffectInstance : public Reference {
- GDCLASS(AudioEffectInstance, Reference);
+class AudioEffectInstance : public RefCounted {
+ GDCLASS(AudioEffectInstance, RefCounted);
public:
virtual void process(const AudioFrame *p_src_frames, AudioFrame *p_dst_frames, int p_frame_count) = 0;
diff --git a/servers/audio/audio_stream.h b/servers/audio/audio_stream.h
index 93566783be..0d426f99b2 100644
--- a/servers/audio/audio_stream.h
+++ b/servers/audio/audio_stream.h
@@ -36,8 +36,8 @@
#include "servers/audio/audio_filter_sw.h"
#include "servers/audio_server.h"
-class AudioStreamPlayback : public Reference {
- GDCLASS(AudioStreamPlayback, Reference);
+class AudioStreamPlayback : public RefCounted {
+ GDCLASS(AudioStreamPlayback, RefCounted);
public:
virtual void start(float p_from_pos = 0.0) = 0;
diff --git a/servers/audio/effects/audio_effect_capture.h b/servers/audio/effects/audio_effect_capture.h
index 81d4ed6b0f..82686d5b4c 100644
--- a/servers/audio/effects/audio_effect_capture.h
+++ b/servers/audio/effects/audio_effect_capture.h
@@ -33,7 +33,7 @@
#include "core/config/engine.h"
#include "core/math/audio_frame.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/templates/vector.h"
#include "servers/audio/audio_effect.h"
#include "servers/audio_server.h"
diff --git a/servers/camera/camera_feed.h b/servers/camera/camera_feed.h
index eb4ef155bc..fac7ae1b2d 100644
--- a/servers/camera/camera_feed.h
+++ b/servers/camera/camera_feed.h
@@ -43,8 +43,8 @@
camera feeds that can be used as the background for our environment.
**/
-class CameraFeed : public Reference {
- GDCLASS(CameraFeed, Reference);
+class CameraFeed : public RefCounted {
+ GDCLASS(CameraFeed, RefCounted);
public:
enum FeedDataType {
diff --git a/servers/camera_server.h b/servers/camera_server.h
index 97aa8f74ba..7390129df9 100644
--- a/servers/camera_server.h
+++ b/servers/camera_server.h
@@ -32,7 +32,7 @@
#define CAMERA_SERVER_H
#include "core/object/class_db.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/os/thread_safe.h"
#include "core/templates/rid.h"
#include "core/variant/variant.h"
diff --git a/servers/physics_server_2d.h b/servers/physics_server_2d.h
index 35430e4a46..df39d6ae50 100644
--- a/servers/physics_server_2d.h
+++ b/servers/physics_server_2d.h
@@ -33,7 +33,7 @@
#include "core/io/resource.h"
#include "core/object/class_db.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
class PhysicsDirectSpaceState2D;
@@ -95,8 +95,8 @@ public:
class PhysicsShapeQueryResult2D;
//used for script
-class PhysicsShapeQueryParameters2D : public Reference {
- GDCLASS(PhysicsShapeQueryParameters2D, Reference);
+class PhysicsShapeQueryParameters2D : public RefCounted {
+ GDCLASS(PhysicsShapeQueryParameters2D, RefCounted);
friend class PhysicsDirectSpaceState2D;
RES shape_ref;
@@ -203,8 +203,8 @@ public:
PhysicsDirectSpaceState2D();
};
-class PhysicsShapeQueryResult2D : public Reference {
- GDCLASS(PhysicsShapeQueryResult2D, Reference);
+class PhysicsShapeQueryResult2D : public RefCounted {
+ GDCLASS(PhysicsShapeQueryResult2D, RefCounted);
Vector<PhysicsDirectSpaceState2D::ShapeResult> result;
@@ -597,8 +597,8 @@ public:
~PhysicsServer2D();
};
-class PhysicsTestMotionResult2D : public Reference {
- GDCLASS(PhysicsTestMotionResult2D, Reference);
+class PhysicsTestMotionResult2D : public RefCounted {
+ GDCLASS(PhysicsTestMotionResult2D, RefCounted);
PhysicsServer2D::MotionResult result;
friend class PhysicsServer2D;
diff --git a/servers/physics_server_3d.h b/servers/physics_server_3d.h
index ec4914641a..d9b805de87 100644
--- a/servers/physics_server_3d.h
+++ b/servers/physics_server_3d.h
@@ -96,8 +96,8 @@ public:
class PhysicsShapeQueryResult3D;
-class PhysicsShapeQueryParameters3D : public Reference {
- GDCLASS(PhysicsShapeQueryParameters3D, Reference);
+class PhysicsShapeQueryParameters3D : public RefCounted {
+ GDCLASS(PhysicsShapeQueryParameters3D, RefCounted);
friend class PhysicsDirectSpaceState3D;
RES shape_ref;
@@ -196,8 +196,8 @@ public:
PhysicsDirectSpaceState3D();
};
-class PhysicsShapeQueryResult3D : public Reference {
- GDCLASS(PhysicsShapeQueryResult3D, Reference);
+class PhysicsShapeQueryResult3D : public RefCounted {
+ GDCLASS(PhysicsShapeQueryResult3D, RefCounted);
Vector<PhysicsDirectSpaceState3D::ShapeResult> result;
diff --git a/servers/rendering/rendering_device_binds.h b/servers/rendering/rendering_device_binds.h
index e43c3669b5..912674e309 100644
--- a/servers/rendering/rendering_device_binds.h
+++ b/servers/rendering/rendering_device_binds.h
@@ -51,8 +51,8 @@
ClassDB::bind_method(D_METHOD("get_" _MKSTR(m_sub) "_" _MKSTR(m_member)), &m_class::get_##m_sub##_##m_member); \
ADD_PROPERTY(PropertyInfo(m_variant_type, _MKSTR(m_sub) "_" _MKSTR(m_member)), "set_" _MKSTR(m_sub) "_" _MKSTR(m_member), "get_" _MKSTR(m_sub) "_" _MKSTR(m_member))
-class RDTextureFormat : public Reference {
- GDCLASS(RDTextureFormat, Reference)
+class RDTextureFormat : public RefCounted {
+ GDCLASS(RDTextureFormat, RefCounted)
friend class RenderingDevice;
RD::TextureFormat base;
@@ -87,8 +87,8 @@ protected:
}
};
-class RDTextureView : public Reference {
- GDCLASS(RDTextureView, Reference)
+class RDTextureView : public RefCounted {
+ GDCLASS(RDTextureView, RefCounted)
friend class RenderingDevice;
@@ -110,8 +110,8 @@ protected:
}
};
-class RDAttachmentFormat : public Reference {
- GDCLASS(RDAttachmentFormat, Reference)
+class RDAttachmentFormat : public RefCounted {
+ GDCLASS(RDAttachmentFormat, RefCounted)
friend class RenderingDevice;
RD::AttachmentFormat base;
@@ -128,8 +128,8 @@ protected:
}
};
-class RDSamplerState : public Reference {
- GDCLASS(RDSamplerState, Reference)
+class RDSamplerState : public RefCounted {
+ GDCLASS(RDSamplerState, RefCounted)
friend class RenderingDevice;
RD::SamplerState base;
@@ -171,8 +171,8 @@ protected:
}
};
-class RDVertexAttribute : public Reference {
- GDCLASS(RDVertexAttribute, Reference)
+class RDVertexAttribute : public RefCounted {
+ GDCLASS(RDVertexAttribute, RefCounted)
friend class RenderingDevice;
RD::VertexAttribute base;
@@ -192,8 +192,8 @@ protected:
RD_BIND(Variant::INT, RDVertexAttribute, frequency);
}
};
-class RDShaderSource : public Reference {
- GDCLASS(RDShaderSource, Reference)
+class RDShaderSource : public RefCounted {
+ GDCLASS(RDShaderSource, RefCounted)
String source[RD::SHADER_STAGE_MAX];
RD::ShaderLanguage language = RD::SHADER_LANGUAGE_GLSL;
@@ -386,8 +386,8 @@ protected:
}
};
-class RDUniform : public Reference {
- GDCLASS(RDUniform, Reference)
+class RDUniform : public RefCounted {
+ GDCLASS(RDUniform, RefCounted)
friend class RenderingDevice;
RD::Uniform base;
@@ -424,8 +424,8 @@ protected:
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "_ids", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), "_set_ids", "get_ids");
}
};
-class RDPipelineRasterizationState : public Reference {
- GDCLASS(RDPipelineRasterizationState, Reference)
+class RDPipelineRasterizationState : public RefCounted {
+ GDCLASS(RDPipelineRasterizationState, RefCounted)
friend class RenderingDevice;
RD::PipelineRasterizationState base;
@@ -459,8 +459,8 @@ protected:
}
};
-class RDPipelineMultisampleState : public Reference {
- GDCLASS(RDPipelineMultisampleState, Reference)
+class RDPipelineMultisampleState : public RefCounted {
+ GDCLASS(RDPipelineMultisampleState, RefCounted)
friend class RenderingDevice;
RD::PipelineMultisampleState base;
@@ -490,8 +490,8 @@ protected:
}
};
-class RDPipelineDepthStencilState : public Reference {
- GDCLASS(RDPipelineDepthStencilState, Reference)
+class RDPipelineDepthStencilState : public RefCounted {
+ GDCLASS(RDPipelineDepthStencilState, RefCounted)
friend class RenderingDevice;
RD::PipelineDepthStencilState base;
@@ -549,8 +549,8 @@ protected:
}
};
-class RDPipelineColorBlendStateAttachment : public Reference {
- GDCLASS(RDPipelineColorBlendStateAttachment, Reference)
+class RDPipelineColorBlendStateAttachment : public RefCounted {
+ GDCLASS(RDPipelineColorBlendStateAttachment, RefCounted)
friend class RenderingDevice;
RD::PipelineColorBlendState::Attachment base;
@@ -594,8 +594,8 @@ protected:
}
};
-class RDPipelineColorBlendState : public Reference {
- GDCLASS(RDPipelineColorBlendState, Reference)
+class RDPipelineColorBlendState : public RefCounted {
+ GDCLASS(RDPipelineColorBlendState, RefCounted)
friend class RenderingDevice;
RD::PipelineColorBlendState base;
diff --git a/servers/text_server.h b/servers/text_server.h
index 7fcfb91151..138ceb9356 100644
--- a/servers/text_server.h
+++ b/servers/text_server.h
@@ -31,7 +31,7 @@
#ifndef TEXT_SERVER_H
#define TEXT_SERVER_H
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/os/os.h"
#include "core/templates/rid.h"
#include "core/variant/variant.h"
diff --git a/servers/xr/xr_interface.h b/servers/xr/xr_interface.h
index d1cf13f5e2..bf026ed773 100644
--- a/servers/xr/xr_interface.h
+++ b/servers/xr/xr_interface.h
@@ -47,8 +47,8 @@
Note that we may make this into a fully instantiable class for GDNative support.
*/
-class XRInterface : public Reference {
- GDCLASS(XRInterface, Reference);
+class XRInterface : public RefCounted {
+ GDCLASS(XRInterface, RefCounted);
public:
enum Capabilities { /* purely meta data, provides some info about what this interface supports */
diff --git a/servers/xr/xr_positional_tracker.h b/servers/xr/xr_positional_tracker.h
index dffa61f369..5577582929 100644
--- a/servers/xr/xr_positional_tracker.h
+++ b/servers/xr/xr_positional_tracker.h
@@ -43,8 +43,8 @@
This is where potentially additional AR/VR interfaces may be active as there are AR/VR SDKs that solely deal with positional tracking.
*/
-class XRPositionalTracker : public Reference {
- GDCLASS(XRPositionalTracker, Reference);
+class XRPositionalTracker : public RefCounted {
+ GDCLASS(XRPositionalTracker, RefCounted);
_THREAD_SAFE_CLASS_
public:
diff --git a/servers/xr_server.h b/servers/xr_server.h
index a2482b925a..25431844c2 100644
--- a/servers/xr_server.h
+++ b/servers/xr_server.h
@@ -31,7 +31,7 @@
#ifndef XR_SERVER_H
#define XR_SERVER_H
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/os/os.h"
#include "core/os/thread_safe.h"
#include "core/templates/rid.h"
diff --git a/tests/test_class_db.h b/tests/test_class_db.h
index 17f9baab85..fe2ed696c5 100644
--- a/tests/test_class_db.h
+++ b/tests/test_class_db.h
@@ -97,7 +97,7 @@ struct ExposedClass {
bool is_singleton = false;
bool is_instantiable = false;
- bool is_reference = false;
+ bool is_ref_counted = false;
ClassDB::APIType api_type;
@@ -131,7 +131,7 @@ struct ExposedClass {
struct NamesCache {
StringName variant_type = StaticCString::create("Variant");
StringName object_class = StaticCString::create("Object");
- StringName reference_class = StaticCString::create("Reference");
+ StringName ref_counted_class = StaticCString::create("RefCounted");
StringName string_type = StaticCString::create("String");
StringName string_name_type = StaticCString::create("StringName");
StringName node_path_type = StaticCString::create("NodePath");
@@ -516,7 +516,7 @@ void add_exposed_classes(Context &r_context) {
exposed_class.api_type = api_type;
exposed_class.is_singleton = Engine::get_singleton()->has_singleton(class_name);
exposed_class.is_instantiable = class_info->creation_func && !exposed_class.is_singleton;
- exposed_class.is_reference = ClassDB::is_parent_class(class_name, "Reference");
+ exposed_class.is_ref_counted = ClassDB::is_parent_class(class_name, "RefCounted");
exposed_class.base = ClassDB::get_parent_class(class_name);
// Add properties
@@ -611,7 +611,7 @@ void add_exposed_classes(Context &r_context) {
method.return_type.name = return_info.class_name;
bool bad_reference_hint = !method.is_virtual && return_info.hint != PROPERTY_HINT_RESOURCE_TYPE &&
- ClassDB::is_parent_class(return_info.class_name, r_context.names_cache.reference_class);
+ ClassDB::is_parent_class(return_info.class_name, r_context.names_cache.ref_counted_class);
TEST_COND(bad_reference_hint, "Return type is reference but hint is not '" _STR(PROPERTY_HINT_RESOURCE_TYPE) "'.", " Are you returning a reference type by pointer? Method: '",
exposed_class.name, ".", method.name, "'.");
} else if (return_info.hint == PROPERTY_HINT_RESOURCE_TYPE) {
diff --git a/tests/test_object.h b/tests/test_object.h
index a12fad51e2..b7eedc2670 100644
--- a/tests/test_object.h
+++ b/tests/test_object.h
@@ -165,8 +165,8 @@ TEST_CASE("[Object] Construction") {
Object object;
CHECK_MESSAGE(
- !object.is_reference(),
- "Object is not a Reference.");
+ !object.is_ref_counted(),
+ "Object is not a RefCounted.");
Object *p_db = ObjectDB::get_instance(object.get_instance_id());
CHECK_MESSAGE(