Fixes a bunch of memleaks related to the new Machine and VFS architecture. The Machine and vfs_node objects were created with 'new' but were never properly destroyed, leading to memleaks during CoW operations and on server shutdown. - Added a recursive 'delete_vfs_tree' function - Machine destructor calls this function to lean up its VFS - CommandProcessor correctly deletes old Machine objects after a CoW - Player destructor cleans up the player's home machine. - NetworkManager destructor cleans up all world machines.
7 lines
96 B
C++
7 lines
96 B
C++
#include "machine.h"
|
|
#include "vfs.h"
|
|
|
|
Machine::~Machine(void) {
|
|
delete_vfs_tree(vfs_root);
|
|
}
|