added release memory