Permalink
Browse files

BZ734367 JBRULES-3217 - This is a small correction but complements the

original fix proposed by JBRULES-3217/Bugzilla-734367. It fix the
memory leak caused by the execution of newBatchExecution -
ksession.execute(CommandFactory.newBatchExecution(commands))
  • Loading branch information...
1 parent d4fc940 commit 854f46213a92fcb18a037dc86bd6779b27cc8ac3 @lazarotti lazarotti committed Feb 9, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 drools-core/src/main/java/org/drools/impl/StatelessKnowledgeSessionImpl.java
@@ -285,6 +285,8 @@ public Globals getGlobals() {
}
} finally {
((StatefulKnowledgeSessionImpl) ksession).session.endBatchExecution();
+ //endBatchExecution is not exclusive of the StatelessSession, so the dispose should be used outside it, like below
+ ksession.dispose();
}
}

0 comments on commit 854f462

Please sign in to comment.