delete unnecessary par in NaiveBayes on memory