I've been running into an issue with my Blackjack server where memory usage slowly creeps up over time, impacting performance until around 10 GB where the game shuts itself down. This was an issue both when I ran the table on Windows and now, on a Linux server.

I believe this is due to scripted objects' scripts remaining in memory when the object is destroyed. Scripts appear to continue running until returning to the main menu, but even then there doesn't seem to be a significant amount of memory freed up.
I threw together a test object here to (relatively) quickly create scripted objects with random junk data, this should make it easier to reproduce.

Steps to reproduce:
  1. Launch the game
  2. Take a note of memory usage on menu.
  3. Start a game and take note of the new memory usage.
  4. Load scripted objects and take note of memory usage.
  5. Delete objects (Or click the Reload button on the reloadable scripted objects) and take note of memory again.
  6. Return to menu.



Menu:


Single player launched:


10MB Scripted (reloadable) object spawned:


Objected reloaded 20 times:


Objected deleted:


Returned to main menu: