releaseElementStreamingLease
Client-side
Releases one live element-streaming token owned by the calling resource.
Syntax
bool releaseElementStreamingLease(int token)GTA task mapping
NATIVE GTA BEHAVIOR
No CTask is created This releases an MTA streaming reference. Any native task lost during the resulting stream-out is not reconstructed by this function.
Arguments
tokenintToken returned to this resource by acquireElementStreamingLease.
Returns
true when the owned token was released; false for an unknown, stale, or foreign token.
Ownership and lifecycle
Each token belongs to the client resource that acquired it and contributes one independent streaming reference. Element destruction invalidates its target, explicit release removes it, and resource shutdown releases every surviving token.
Important behavior
- Releasing the last reference allows normal MTA streaming to remove the element again.
- Element destruction makes the retained target safe to discard; resource shutdown releases every remaining token automatically.
Where this comes from
SOURCECLuaElementDefs.cppClient/mods/deathmatch/logic/luadefs/CLuaElementDefs.cpp INTRODUCED / EXTENDED2314459caRead the commit and why the change was made TEST RESOURCE native-simulation-lease-test test-resources/native-simulation-lease-test
RELATED NEON APIS
Read the system guide → Continue exploring
← Back to the Neon Lua API · How Resource-owned streaming leases works →