Any cleanup you need to do when the world exits should be done in world.Del(). Calling that procedure is the first action to be taken during shutdown, so it is the only time at which you can expect the world to be in a self-consistent state. After that, objects are deleted in an arbitrary order, which can result in unexpected behavior if you do anything with other objects in your Del() procs. If you need to do some complicated cleanup for an object that still exists at shutdown time, just be sure to call the proc that handles it from world.Del(), rather than waiting for the server to call your object's Del() proc.