Discussion in 'Development' started by Levi, Jul 31, 2020.
how to prevent memory leaks?
do i unset every array when players leave?
Don't hold unecessary data. Clear unneeded entries and/or properties. If you're dealing with player related properties then You're better using Session class and do ::create ::close
Read this article, hope it helps:https://scoutapm.com/blog/php-memory-leaks-how-to-find-and-fix-them
ok so i should unset players from array when they leave?
Without a doubt.
is that yes sorry
It is yes. No need to hold reference for an old object. Let garbage collector take it.
Separate names with a comma.