[Generator] move clearRelatedInstancePooling