mem cleanup for sweep