- fix permutation memory leak