GC_UNLOAD build time define and replaced with flag to change it at runtime.

This commit is contained in:
jussi
2023-11-15 18:34:34 +02:00
parent 7b10306ed5
commit 841aa897f1
10 changed files with 80 additions and 81 deletions

View File

@@ -1253,6 +1253,17 @@ int lcoreIsGCUnloadEnabled( lua_State *L ) {
return 1;
}
/*
> RL.SetGCUnload( bool enabled )
Set Lua garbage collection to unload object data
*/
int lcoreSetGCUnload( lua_State *L ) {
state->gcUnload = uluaGetBoolean( L, 1 );
return 0;
}
/*
## Core - Files management functions
*/