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

...s n+1 patterns are extracted, only record the count.