Clear memory after close desktops' manager.