When does instances get garbage collected ?

You can find my project at

wich is a project in work. You can see the problem when unloading/loading maps by changing the map urls between a valid map and an empty string. Map is provided in project under /maps