fixed major memory leaks, where the quad tree would not be deleted by the garbage collector properly