mirror of
https://github.com/worldforge/cyphesis
synced 2026-08-13 12:26:04 -04:00
The memory leak crackdown
* rulesets/BaseMind.cpp, rulesets/MemMap.h, rulesets/MemMap.cpp: Add code to flush a characters memory as its mind is deleted. * rulsets/Character.cpp: Delete movement class associated with character when character is deleted. * rulesets/EntityFactory.h, rulesets/EntityFactory.cpp: Delete all the entity factories when the server shuts down. * rulesets/PythonScript.cpp: Decrease reference of and thereby delete the python script at delete time. * server/ServerRouting.cpp: Delete all the objects in idDict, which should include all in game objects, and all explicitly out of game objects, like accounts. * server/WorldRouter.cpp: Delete all pending operations, gameWorld object. Ensure that an object is deleted from ServerRouting's idDict when it is deleted from the world. * server/CommServer.h, server/server.cpp: Added CommServer destructor which deletes all client objects and the server object. * server/server.cpp: Delete the database persistant object and the entity factory at shutdown. Al Riddoch <alriddoch@zepler.org>
This commit is contained in:
parent
8155b36c88
commit
089d3e48a3
14 changed files with 88 additions and 1 deletions
|
|
@ -11,4 +11,5 @@ PythonScript::PythonScript(PyObject * o, Entity & t) :
|
|||
|
||||
PythonScript::~PythonScript()
|
||||
{
|
||||
Py_DECREF(scriptObject);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue