Fix memory leaks, added some memory debugging

next step is to fix my console text rendering time, then fix the rope
simulation on _DEBUG settings