Skip to content

Commit 1f22c92

Browse files
Document that preloaded resources are never freed
1 parent 63b7e02 commit 1f22c92

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

modules/gdscript/doc_classes/@GDScript.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@
193193
<description>
194194
Returns a [Resource] from the filesystem located at [param path]. During run-time, the resource is loaded when the script is being parsed. This function effectively acts as a reference to that resource. Note that this function requires [param path] to be a constant [String]. If you want to load a resource from a dynamic/variable path, use [method load].
195195
[b]Note:[/b] Resource paths can be obtained by right-clicking on a resource in the Assets Panel and choosing "Copy Path", or by dragging the file from the FileSystem dock into the current script.
196+
[b]Warning:[/b] Preloaded resources will never be freed. This behavior may change in the near future and should not be taken into consideration for your software.
196197
[codeblock]
197198
# Create instance of a scene.
198199
var diamond = preload("res://diamond.tscn").instantiate()

0 commit comments

Comments
 (0)