Wait() has nothing to do with releasing memory. If your second version did not work, then the entity was probably still rendered in the level, and thus the purged video memory was immediately allocated again.