Have Memory remember which process it is attached to and auto-detach when moving to a new one