Skip to main content

Please review my fix for CR 6658227

1 reply [Last post]
ersh
Offline
Joined: 2006-10-18
Points: 0

6658227 "Memory leaks: Harness doesn't release objects properly when working with a single-instance TestSuite"

1. Start the tool. Create a work directory based (on an template), create configuration. Close the tool.
2. Start the tool (optionally - with -newDesktop option).
3. File/Open . Wait until all tests are read.
4. Now do a File/Create WD. You'll be asked if you want to close current instance and open a new one instead - answer yes. Fill necessary entries, press Create. Wait until all tests are read.
5. Repeat 4) 2-3 times.
6. Note strong increase of the memory consumption in the profiler. Take a snapshot. See number of TestResult and TestDescription objects - it will be approximately (N-1)*NumberOfTests where N is number of CreateWD action you've done in 5).

So the problem:
- if TestSuite permits only one instance to be opened in the Harness
- and user is doing consecutive File/CreateWD operations
- then TestResult/TestDescription objects from the previous instances of TestSuite are NOT released and held by the Harness.
-------------------------------
Please review my fix , see https://jtharness.dev.java.net/source/browse/jtharness?view=rev&rev=1571
I'm not 100% sure that I fixed ALL memory leaks but at least all related with WorkDirChooseTool
TIA,

Mike

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
bkurotsu
Offline
Joined: 2004-12-13
Points: 0

Integrated. Please keep looking for leaks though, so we can be confident that leaks are mostly plugged.

Thanks.