Added memory cleanup.
Merge branch 'master' into part_pattern