Function ephemeral

  • Mark an item as ephemeral. This means that the item will be freed after the current tick.

    If you don't use this to clean up your data, you'll need to call free() yourself.

    Type Parameters

    • T extends { free: () => void }

    Parameters

    • item: T

      The item to be cleaned up.

    Returns T

    The item.