forgottenserver icon indicating copy to clipboard operation
forgottenserver copied to clipboard

Fix memory leaks on reloads

Open MillhioreBT opened this issue 1 year ago • 1 comments

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!

MillhioreBT avatar Aug 14 '24 22:08 MillhioreBT

Looks pretty good, I'll check this in-game soon

nekiro avatar Dec 22 '24 23:12 nekiro