finish memory