forgottenserver
forgottenserver copied to clipboard
Fix memory leaks on reloads
Pull Request Prelude
- [x] I have followed [proper The Forgotten Server code styling][code].
- [x] I have read and understood the [contribution guidelines][cont] before making this PR.
- [x] I am aware that this PR may be closed if the above-mentioned criteria are not fulfilled.
Changes Proposed
These changes will cause that when you do /reload the scripts will be cleaned from the reference table, this way there will be no memory leak.
The only case that is not covered is /reload items, for some reason this method produces an increase in memory on each reload: bool Items::loadFromXml()
Issues addressed: Nothing!
Looks pretty good, I'll check this in-game soon