Looking for a method to reset lua env

Post Reply
zhenzh
Posts: 56
Joined: Fri Apr 17, 2020 2:23 am

Looking for a method to reset lua env

Post by zhenzh »

Is there a graceful and light method to clean current running LUA env including removing all global/local values, terminating running coroutines and deleting existing temp triggers/timers?

I'm now using resetProfile() and reloadModule() to implement such operation, but I think it's so heavy that all modules/packages are reloaded.

User avatar
Vadi
Posts: 4878
Joined: Sat Mar 14, 2009 3:13 pm

Re: Looking for a method to reset lua env

Post by Vadi »

Just resetProfile() is available for this, it gives you a "fresh start".

Post Reply