.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. .. _class_Reference: Reference ========= **Inherits:** :ref:`Object` **Inherited By:** :ref:`RegEx`, :ref:`SurfaceTool`, :ref:`SpatialGizmo`, :ref:`EditorScenePostImport`, :ref:`PhysicsShapeQueryResult`, :ref:`Physics2DTestMotionResult`, :ref:`FuncRef`, :ref:`File`, :ref:`TCP_Server`, :ref:`Physics2DShapeQueryResult`, :ref:`ConfigFile`, :ref:`StreamPeer`, :ref:`HTTPClient`, :ref:`AudioStreamPlayback`, :ref:`Physics2DShapeQueryParameters`, :ref:`MeshDataTool`, :ref:`GDFunctionState`, :ref:`EditorExportPlugin`, :ref:`EditorScript`, :ref:`Mutex`, :ref:`PacketPeer`, :ref:`Semaphore`, :ref:`XMLParser`, :ref:`EditorImportPlugin`, :ref:`Directory`, :ref:`Marshalls`, :ref:`AStar`, :ref:`SceneState`, :ref:`GDNativeClass`, :ref:`PCKPacker`, :ref:`WeakRef`, :ref:`Resource`, :ref:`Thread`, :ref:`PackedDataContainerRef`, :ref:`ResourceInteractiveLoader`, :ref:`ResourceImportMetadata`, :ref:`PhysicsShapeQueryParameters` **Category:** Core Brief Description ----------------- Base class for anything that keeps a reference count. Member Functions ---------------- +--------------------------+--------------------------------------------------------------+ | :ref:`bool` | :ref:`init_ref` **(** **)** | +--------------------------+--------------------------------------------------------------+ | void | :ref:`reference` **(** **)** | +--------------------------+--------------------------------------------------------------+ | :ref:`bool` | :ref:`unreference` **(** **)** | +--------------------------+--------------------------------------------------------------+ Description ----------- Base class for anything that keeps a reference count. Resource and many other helper objects inherit this. References keep an internal reference counter so they are only released when no longer in use. Member Function Description --------------------------- .. _class_Reference_init_ref: - :ref:`bool` **init_ref** **(** **)** .. _class_Reference_reference: - void **reference** **(** **)** Increase the internal reference counter. Use this only if you really know what you are doing. .. _class_Reference_unreference: - :ref:`bool` **unreference** **(** **)** Decrease the internal reference counter. Use this only if you really know what you are doing.