fully integrated memo into gc (cleanup of m and r)