MCPcopy Create free account
hub / github.com/defold/defold / Stream_gc

Function Stream_gc

engine/gamesys/src/gamesys/scripts/script_buffer.cpp:818–828  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

816 // STREAM
817
818 static int Stream_gc(lua_State* L)
819 {
820 DM_LUA_STACK_CHECK(L, 0);
821 BufferStream* stream = CheckStreamNoError(L, 1);
822 if( stream )
823 {
824 // decrease ref to buffer
825 dmScript::Unref(L, LUA_REGISTRYINDEX, stream->m_BufferRef);
826 }
827 return 0;
828 }
829
830 static int Stream_tostring(lua_State* L)
831 {

Callers

nothing calls this directly

Calls 2

CheckStreamNoErrorFunction · 0.85
UnrefFunction · 0.85

Tested by

no test coverage detected