rabbit/doc/source/reference/api/garbage_collector.rst
Markus F.X.J. Oberhumer 00b4d3abd1 Normalize whitespace.
Strip trailing whitespace, de-tabify and ensure that each file
ends with a newline.
2017-06-14 14:09:53 +02:00

28 lines
862 B
ReStructuredText

.. _api_ref_garbage_collector:
=================
Garbage Collector
=================
.. _sq_collectgarbage:
.. c:function:: SQInteger sq_collectgarbage(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
:remarks: this api only works with garbage collector builds (NO_GARBAGE_COLLECTOR is not defined)
runs the garbage collector and returns the number of reference cycles found (and deleted)
.. _sq_resurrectunreachable:
.. c:function:: SQRESULT sq_resurrectunreachable(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
:remarks: this api only works with garbage collector builds (NO_GARBAGE_COLLECTOR is not defined)
runs the garbage collector and pushes an array in the stack containing all unreachable object found. If no unreachable object is found, null is pushed instead. This function is meant to help debug reference cycles.