Loading ...
Sorry, an error occurred while loading the content.

how to clear the memory

Expand Messages
  • vlad
    Hello, First of all, sorry for my bad english. I try to run some code line which read data from 2 sensors. After a small number of reading, the memory
    Message 1 of 2 , Feb 17, 2012
    • 0 Attachment
      Hello,

      First of all, sorry for my bad english.

      I try to run some code line which read data from 2 sensors. After a small number of reading, the memory utilization bar is full and my programme is blocked. How can I clean the memory so I can make more readings?

      Thank you
      Vlad Cristea
    • Jools Chadwick
      ... Sorry but I m not sure I can help you. The VM has a garbage collector just like the Java runtime on your computer. If objects are unreferenced, they will
      Message 2 of 2 , Feb 23, 2012
      • 0 Attachment
        On 17/02/2012 12:41, vlad wrote:
         

        Hello,

        First of all, sorry for my bad english.

        I try to run some code line which read data from 2 sensors. After a small number of reading, the memory utilization bar is full and my programme is blocked. How can I clean the memory so I can make more readings?

        Thank you
        Vlad Cristea

        Sorry but I'm not sure I can help you. The VM has a garbage collector just like the Java runtime on your computer. If objects are unreferenced, they will be freed.  You can't manually free memory in Java. You can request that the garbage collector run ASAP. It sounds like there's a problem with you code involving something maintaining to many old references to objects, so they cannot be cleared. Did you not get a tonne of sample code with RoboJDE? You can get some sensor specific stuff here.

        Best,
        Jools
      Your message has been successfully submitted and would be delivered to recipients shortly.