modified that release version also retains memory