awltech/org.parallelj — pull request #91 by pbarnoux (2013-08-02 15:08:08+00:00)
Title: Memory leak fix

When processing the same job again and again using the same instance of Launch (deployed in Tomee for instance), there is a memory leak that will eventually lead to an OutOfMemory.

Dump the heap, inspect the Launch instance and you'll see that listeners keep strong references on past executed jobs. Here is a proposed (quick & somewhat dirty) fix that seems to fix it for syncLaunch.

Tested on Tomee+//J Xmx50m, starting the same job (doing nothing) over and over:
* parallelj-launching:1.3.2 : OOM when running the 7th job ;
* parallelj-launching:1.3.2-BUGFIX : 210th job ran smoothly (stopped the test at that point).