From 04688b92fff1d6bbec9335b354f3751ddc473379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Fri, 4 Jun 2021 18:03:15 +0200 Subject: Rename Reference to RefCounted --- doc/classes/AESContext.xml | 2 +- doc/classes/AStar.xml | 2 +- doc/classes/AStar2D.xml | 2 +- doc/classes/AnimationTrackEditPlugin.xml | 2 +- doc/classes/AudioEffectInstance.xml | 2 +- doc/classes/AudioStreamPlayback.xml | 2 +- doc/classes/CameraFeed.xml | 2 +- doc/classes/CharFXTransform.xml | 2 +- doc/classes/ConfigFile.xml | 2 +- doc/classes/Crypto.xml | 2 +- doc/classes/DTLSServer.xml | 2 +- doc/classes/Directory.xml | 2 +- doc/classes/EditorExportPlugin.xml | 2 +- doc/classes/EditorFeatureProfile.xml | 2 +- doc/classes/EditorInspectorPlugin.xml | 2 +- doc/classes/EditorResourceConversionPlugin.xml | 2 +- doc/classes/EditorResourcePreviewGenerator.xml | 2 +- doc/classes/EditorSceneImporter.xml | 2 +- doc/classes/EditorScenePostImport.xml | 2 +- doc/classes/EditorScript.xml | 2 +- doc/classes/EditorTranslationParserPlugin.xml | 2 +- doc/classes/EncodedObjectAsID.xml | 2 +- doc/classes/Expression.xml | 2 +- doc/classes/File.xml | 2 +- doc/classes/HMACContext.xml | 2 +- doc/classes/HTTPClient.xml | 2 +- doc/classes/HashingContext.xml | 2 +- doc/classes/JSONParseResult.xml | 2 +- doc/classes/JSONParser.xml | 2 +- doc/classes/JavaClass.xml | 2 +- doc/classes/JavaScriptObject.xml | 2 +- doc/classes/KinematicCollision2D.xml | 2 +- doc/classes/KinematicCollision3D.xml | 2 +- doc/classes/Lightmapper.xml | 2 +- doc/classes/MeshDataTool.xml | 2 +- doc/classes/MultiplayerAPI.xml | 2 +- doc/classes/Mutex.xml | 2 +- doc/classes/Node3DGizmo.xml | 2 +- doc/classes/Object.xml | 4 +- doc/classes/PCKPacker.xml | 2 +- doc/classes/PackedDataContainerRef.xml | 4 +- doc/classes/PacketPeer.xml | 2 +- doc/classes/PhysicsShapeQueryParameters2D.xml | 2 +- doc/classes/PhysicsShapeQueryParameters3D.xml | 2 +- doc/classes/PhysicsShapeQueryResult2D.xml | 2 +- doc/classes/PhysicsShapeQueryResult3D.xml | 2 +- doc/classes/PhysicsTestMotionResult2D.xml | 2 +- doc/classes/RDAttachmentFormat.xml | 2 +- doc/classes/RDPipelineColorBlendState.xml | 2 +- .../RDPipelineColorBlendStateAttachment.xml | 2 +- doc/classes/RDPipelineDepthStencilState.xml | 2 +- doc/classes/RDPipelineMultisampleState.xml | 2 +- doc/classes/RDPipelineRasterizationState.xml | 2 +- doc/classes/RDSamplerState.xml | 2 +- doc/classes/RDShaderSource.xml | 2 +- doc/classes/RDTextureFormat.xml | 2 +- doc/classes/RDTextureView.xml | 2 +- doc/classes/RDUniform.xml | 2 +- doc/classes/RDVertexAttribute.xml | 2 +- doc/classes/RandomNumberGenerator.xml | 2 +- doc/classes/RefCounted.xml | 43 ++++++++++++++++++++++ doc/classes/Reference.xml | 43 ---------------------- doc/classes/Resource.xml | 4 +- doc/classes/ResourceFormatLoader.xml | 2 +- doc/classes/ResourceFormatSaver.xml | 2 +- doc/classes/ResourceImporter.xml | 2 +- doc/classes/SceneState.xml | 2 +- doc/classes/SceneTreeTimer.xml | 2 +- doc/classes/Semaphore.xml | 2 +- doc/classes/SkinReference.xml | 2 +- doc/classes/StreamPeer.xml | 2 +- doc/classes/SurfaceTool.xml | 2 +- doc/classes/TCPServer.xml | 2 +- doc/classes/TextLine.xml | 2 +- doc/classes/TextParagraph.xml | 2 +- doc/classes/Thread.xml | 2 +- doc/classes/TriangleMesh.xml | 2 +- doc/classes/UDPServer.xml | 2 +- doc/classes/Variant.xml | 2 +- doc/classes/VelocityTracker3D.xml | 2 +- doc/classes/WeakRef.xml | 4 +- doc/classes/XMLParser.xml | 2 +- doc/classes/XRInterface.xml | 2 +- doc/classes/XRPositionalTracker.xml | 2 +- 84 files changed, 129 insertions(+), 129 deletions(-) create mode 100644 doc/classes/RefCounted.xml delete mode 100644 doc/classes/Reference.xml (limited to 'doc/classes') 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 @@ - + Interface to low level AES encryption features. 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 @@ - + An implementation of A* to find the shortest paths among connected points in space. 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 @@ - + AStar class representation that uses 2D vectors as edges. 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 @@ - + 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 @@ - + 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 @@ - + Meta class for playing back audio. 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 @@ - + A camera feed gives you access to a single physical camera attached to your device. 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 @@ - + Controls how an individual character will be displayed in a [RichTextEffect]. 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 @@ - + Helper class to handle INI-style files. 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 @@ - + Access to advanced cryptographic functionalities. 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 @@ - + Helper class to implement a DTLS server. 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 @@ - + Type used to handle the filesystem. 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 @@ - + A script that is executed when exporting the project. 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 @@ - + An editor feature profile which can be used to disable specific features. 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 @@ - + Plugin for adding custom property editors on inspector. 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 @@ - + 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 @@ - + Custom generator of previews. 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 @@ - + Imports scenes from third-parties' 3D files. 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 @@ - + Post-processes scenes after import. 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 @@ - + Base script that can be used to add extension functions to the editor. 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 @@ - + Plugin for adding custom parsers to extract strings that are to be translated from custom files (.csv, .json etc.). 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 @@ - + Holds a reference to an [Object]'s instance ID. 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 @@ - + A class that stores an expression you can execute. 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 @@ - + Type to handle file reading and writing operations. 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 @@ - + Used to create an HMAC for a message using a key. 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 @@ - + Low-level hyper-text transfer protocol client. 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 @@ - + Context to compute cryptographic hashes over multiple iterations. 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 @@ - + Data class wrapper for decoded JSON. 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 @@ - + 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 @@ - + 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 @@ - + A wrapper class for native JavaScript objects. 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 @@ - + Collision data for [method PhysicsBody2D.move_and_collide] collisions. 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 @@ - + Collision data for [method PhysicsBody3D.move_and_collide] collisions. 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 @@ - + 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 @@ - + Helper tool to access and edit [Mesh] data. 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 @@ - + High-level multiplayer API. 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 @@ - + A synchronization mutex (mutual exclusion). 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 @@ - + 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]. https://docs.godotengine.org/en/latest/getting_started/workflow/best_practices/node_alternatives.html 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 @@ - + Creates packages that can be loaded into a running project. 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 @@ - + - Reference version of [PackedDataContainer]. + Reference-counted version of [PackedDataContainer]. 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 @@ - + Abstraction and base class for packet-based protocols. 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 @@ - + Parameters to be sent to a 2D shape physics query. 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 @@ - + Parameters to be sent to a 3D shape physics query. 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 @@ - + Result of a 2D shape query in [PhysicsServer2D]. 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 @@ - + Result of a 3D shape query in [PhysicsServer3D]. 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 @@ - + 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 @@ - + 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 @@ - + 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 @@ - + 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 @@ - + 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 @@ - + 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 @@ - + 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 @@ - + 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 @@ - + 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 @@ - + 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 @@ - + 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 @@ - + 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 @@ - + 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 @@ - + A class for generating pseudo-random numbers. diff --git a/doc/classes/RefCounted.xml b/doc/classes/RefCounted.xml new file mode 100644 index 0000000000..cf96514203 --- /dev/null +++ b/doc/classes/RefCounted.xml @@ -0,0 +1,43 @@ + + + + Base class for reference-counted objects. + + + 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 [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. + + + https://docs.godotengine.org/en/latest/getting_started/workflow/best_practices/node_alternatives.html + + + + + + + Initializes the internal reference counter. Use this only if you really know what you are doing. + Returns whether the initialization was successful. + + + + + + + Increments the internal reference counter. Use this only if you really know what you are doing. + Returns [code]true[/code] if the increment was successful, [code]false[/code] otherwise. + + + + + + + Decrements the internal reference counter. Use this only if you really know what you are doing. + Returns [code]true[/code] if the decrement was successful, [code]false[/code] otherwise. + + + + + + diff --git a/doc/classes/Reference.xml b/doc/classes/Reference.xml deleted file mode 100644 index 724d2db924..0000000000 --- a/doc/classes/Reference.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - Base class for reference-counted objects. - - - 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. - [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. - - - https://docs.godotengine.org/en/latest/getting_started/workflow/best_practices/node_alternatives.html - - - - - - - Initializes the internal reference counter. Use this only if you really know what you are doing. - Returns whether the initialization was successful. - - - - - - - Increments the internal reference counter. Use this only if you really know what you are doing. - Returns [code]true[/code] if the increment was successful, [code]false[/code] otherwise. - - - - - - - Decrements the internal reference counter. Use this only if you really know what you are doing. - Returns [code]true[/code] if the decrement was successful, [code]false[/code] otherwise. - - - - - - 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 @@ - + Base class for all resources. - 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. 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 @@ - + Loads a specific resource type from a file. 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 @@ - + Saves a specific resource type to a file. 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 @@ - + 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 @@ - + A script interface to a scene file's data. 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 @@ - + One-shot timer. 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 @@ - + A synchronization semaphore. 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 @@ - + 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 @@ - + Abstraction and base class for stream-based protocols. 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 @@ - + Helper tool to create geometry. 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 @@ - + A TCP server. 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 @@ - + Holds a line of text. 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 @@ - + Holds a paragraph of text. 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 @@ - + A unit of execution in a process. 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 @@ - + Internal mesh type. 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 @@ - + Helper class to implement a UDP server. 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 @@ - + diff --git a/doc/classes/WeakRef.xml b/doc/classes/WeakRef.xml index 4140df5828..6c9a7de67f 100644 --- a/doc/classes/WeakRef.xml +++ b/doc/classes/WeakRef.xml @@ -1,10 +1,10 @@ - + Holds an [Object], but does not contribute to the reference count if the object is a reference. - A weakref can hold a [Reference], without contributing to the reference counter. A weakref can be created from an [Object] using [method @GlobalScope.weakref]. If this object is not a reference, weakref still works, however, it does not have any effect on the object. Weakrefs are useful in cases where multiple classes have variables that refer to each other. Without weakrefs, using these classes could lead to memory leaks, since both references keep each other from being released. Making part of the variables a weakref can prevent this cyclic dependency, and allows the references to be released. + A weakref can hold a [RefCounted], without contributing to the reference counter. A weakref can be created from an [Object] using [method @GlobalScope.weakref]. If this object is not a reference, weakref still works, however, it does not have any effect on the object. Weakrefs are useful in cases where multiple classes have variables that refer to each other. Without weakrefs, using these classes could lead to memory leaks, since both references keep each other from being released. Making part of the variables a weakref can prevent this cyclic dependency, and allows the references to be released. 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 @@ - + Low-level class for creating parsers for [url=https://en.wikipedia.org/wiki/XML]XML[/url] files. 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 @@ - + Base class for an AR/VR interface implementation. 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 @@ - + A tracked object. -- cgit v1.2.3