Hi, i have a SkyWarsGame class that I want to kill. In php you need to call unset to the object to stop its processes. This doesn't work for me. How can i stop all the processes such as tasks and other functions? (I know how to stop a task btw )
Unset, or setting a variable to anything else, simply destroys your local reference. PocketMine still holds the references to the objects, so they won't get destructed. What exactly do you want to do?
So I have private matches, and I want all processes/events to stop when the match finishes because it will not be used anymore and will just waste memory
Cancel the tasks gracefully from the PocketMine API. For the events, you shouldn't have registered multiple listeners in the same plugin.