.. 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<class_object>`

**Inherited By:** :ref:`RegExMatch<class_regexmatch>`, :ref:`EncodedObjectAsID<class_encodedobjectasid>`, :ref:`SurfaceTool<class_surfacetool>`, :ref:`SpatialGizmo<class_spatialgizmo>`, :ref:`TriangleMesh<class_trianglemesh>`, :ref:`PhysicsShapeQueryResult<class_physicsshapequeryresult>`, :ref:`Physics2DTestMotionResult<class_physics2dtestmotionresult>`, :ref:`FuncRef<class_funcref>`, :ref:`Marshalls<class_marshalls>`, :ref:`File<class_file>`, :ref:`TCP_Server<class_tcp_server>`, :ref:`Physics2DShapeQueryResult<class_physics2dshapequeryresult>`, :ref:`ConfigFile<class_configfile>`, :ref:`StreamPeer<class_streampeer>`, :ref:`HTTPClient<class_httpclient>`, :ref:`AudioStreamPlayback<class_audiostreamplayback>`, :ref:`VisualScriptFunctionState<class_visualscriptfunctionstate>`, :ref:`KinematicCollision<class_kinematiccollision>`, :ref:`GDFunctionState<class_gdfunctionstate>`, :ref:`SpatialVelocityTracker<class_spatialvelocitytracker>`, :ref:`EditorResourcePreviewGenerator<class_editorresourcepreviewgenerator>`, :ref:`Physics2DShapeQueryParameters<class_physics2dshapequeryparameters>`, :ref:`ARVRInterface<class_arvrinterface>`, :ref:`EditorScript<class_editorscript>`, :ref:`Mutex<class_mutex>`, :ref:`PacketPeer<class_packetpeer>`, :ref:`Semaphore<class_semaphore>`, :ref:`XMLParser<class_xmlparser>`, :ref:`EditorImportPlugin<class_editorimportplugin>`, :ref:`Directory<class_directory>`, :ref:`AStar<class_astar>`, :ref:`SceneState<class_scenestate>`, :ref:`GDNativeClass<class_gdnativeclass>`, :ref:`RegEx<class_regex>`, :ref:`PCKPacker<class_pckpacker>`, :ref:`MeshDataTool<class_meshdatatool>`, :ref:`WeakRef<class_weakref>`, :ref:`ResourceImporter<class_resourceimporter>`, :ref:`Resource<class_resource>`, :ref:`SceneTreeTimer<class_scenetreetimer>`, :ref:`Thread<class_thread>`, :ref:`PackedDataContainerRef<class_packeddatacontainerref>`, :ref:`ResourceInteractiveLoader<class_resourceinteractiveloader>`, :ref:`GDNative<class_gdnative>`, :ref:`PhysicsShapeQueryParameters<class_physicsshapequeryparameters>`

**Category:** Core

Brief Description
-----------------

Base class for anything that keeps a reference count.

Member Functions
----------------

+--------------------------+--------------------------------------------------------------+
| :ref:`bool<class_bool>`  | :ref:`init_ref<class_Reference_init_ref>`  **(** **)**       |
+--------------------------+--------------------------------------------------------------+
| void                     | :ref:`reference<class_Reference_reference>`  **(** **)**     |
+--------------------------+--------------------------------------------------------------+
| :ref:`bool<class_bool>`  | :ref:`unreference<class_Reference_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<class_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<class_bool>`  **unreference**  **(** **)**

Decrease the internal reference counter. Use this only if you really know what you are doing.


