TWS & Java eating memory

Discussion in 'Retail Brokers' started by Rex, Jul 1, 2009.

  1. There are plenty of ways of leaking memory in a Java app. One of the easiest is to put objects into a Collection eg a Vector. If you don't explicitly remove them or call clear (), the memory will leak when the Collection goes out of scope.

    Another way is to leave references to an object lying around when the app no longer needs that object.

    The good news is that excellent Java profilers (such as Netbeans profiler) make finding leaks relatively painless.
     
    #11     Jul 7, 2009
  2. gkishot

    gkishot

    If the collection goes out of scope shouldn't garbage collector remove the reference to this vector and consequently to all it's elements?
     
    #12     Jul 8, 2009
  3. why doesn't the problem affect us all? By the responses it's far from a global issue.
     
    #13     Jul 8, 2009
  4. gkishot

    gkishot

    That's the insidiousness of the poor written code that the problem might appear at random and might not affect all users. The fact that the problem does not affect all users does not mean that it does not exist.
     
    #14     Jul 8, 2009
  5. thanks
     
    #15     Jul 8, 2009
  6. Rex

    Rex

    Bingo....

    I'm no programmer but this makes the sense.

    Basically there is data or references that are not longer needed but are still adsorbing memory.

    I've just tried the latest version with no improvement.

    When using the grouping function, I tab the stock list in order management window Java grabs another 10,000k memory and never releases it.



     
    #16     Jul 8, 2009
  7. Eight

    Eight

    TWS is a mess and has been for a long time and there is no reason AT ALL to think that it won't always be.. the best answer is to use third party apps. That shifts the burden of keeping up with TWS's insanity to the developers of the third party apps... and they only have to deal with the API.

    TWS is horrible to look at anyhow, jeez, get some aesthetic sensibilities and hide that ugly pos...
     
    #17     Jul 8, 2009
  8. Rex

    Rex

    Hey 8,

    I'm starting to believe u r right.


    :(
     
    #18     Jul 8, 2009
  9. One thing to keep in mind is that 3rd party software can only work, if the TWS is running. So there is potential that there is a memory-leak, which is not the fault of the developer of the 3rd party app.
     
    #19     Jul 8, 2009
  10. Rex

    Rex

    Couple things come to mind...

    1. maybe it is and others haven't noticed due to limited activity. If I don't look at more then 20 charts during a login, you wouldn't have a problem, but you will still loose memory just not enough to crash the system.

    2. could be a settings issue.

    3. could be the way the program is being used.

    4. Could be Java version dependent or OS issue.

    5. hardware issue, unlikely but possible. ie not enough free memory

    6. maybe isn't not a giant issue because many have been so disgusted with IB charting that most are using 3rd party apps. If u r not using their charts u wouldn't have the problem
     
    #20     Jul 9, 2009