free the memory of obsolete scene