Memory Optimization: release all the instances for each pattern, when its n+1 patterns are extracted, only record the count.
Merge pull request #1016 from shujingke/PM

Memory Optimization: release all the instances for each pattern, when it...