Skip to content

Reference Count rc

Returns the reference count of an object.

 (set x [1 2 3])
 (rc x)
1
 (set y x)
 (rc x)
2

Info

  • Shows how many references point to an object
  • Useful for debugging memory management
  • Objects are freed when reference count reaches 0

Warning

This is a debugging tool and should not be relied upon in production code

Tip

Use rc to track object references when debugging memory issues