setretaininstance