Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#39 keep(true) to keep the rot small

1.17 Accepted
closed-rejected
nobody
COM Data (10)
5
2014-03-23
2011-07-20
Jarek Czekalski
No

A year ago or so I presented an idea to prevent ROT overgrowth which was killing my application. Now I have a better solution to this. What do you think about the following approach:

1. Divide jacob objects to "keeped" and "temporary objects". All are temporary except ones marked using the JacobObject.keep(true) method. So every object jacob creates behind the scene is temporary.
2. Implement ComThread.clearTempObjects() method to get rid of all temporary objects.

So when I use excel I first do:
excel.keep(), workbook.keep(), sh.keep()
Then for every completed row I call ComThread.clearTempObjects(). Rot contains only these several objects that must stay in memory.

I attach the patch to review. The patch may need some refining and even may not fit the newest jacob, because I prepared it for 1.15M3. But if you buy the idea I can work on it further.

Discussion

  • a patch

     
    Attachments
  • clay_shooter
    clay_shooter
    2014-03-23

    • status: open --> closed-rejected
    • Group: --> 1.17 Accepted