Skip to content

Commit 6e952ad

Browse files
J38Stanford NLP
authored and
Stanford NLP
committed
tell pool to clear() before setting to null
1 parent 80be727 commit 6e952ad

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/edu/stanford/nlp/pipeline/StanfordCoreNLP.java

+2
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,8 @@ private void construct(Properties props, boolean enforceRequirements, AnnotatorI
481481
* release the memory associated with the annotators.
482482
*/
483483
public static synchronized void clearAnnotatorPool() {
484+
if (pool != null)
485+
pool.clear();
484486
pool = null;
485487
}
486488

0 commit comments

Comments
 (0)