You can explicitly call the garbage collector in your program with:
     System.gc()
It _should_ be called automagically so it's curious that you need
to do it yourself. Make sure you null variables that you no longer
use as any left over references will prevent the memory from being
collected.

MS


himanshu barve wrote:
> Hello all .
> I have developed an application using serialforwarder .
> This application is supposed to be run continuosly .
> But i am facing some problem when i run this application for 1-2 days .
> 
> 1) Heap memory issue.  The program stops executing giving error out of
> memory exception.
> I have almost solve this problem by more and more optimising my
> program , destroying or limiting arrays / variables . Still the
> problem is not solved totally .
> I am using Jconsole Tool in JDK_HOME/bin . This tool gives all memory
> usage of application .  In this Jconsole tool there is a option
> perform GC ie Garbage Collection.
> When i see that my app is using more memory (after 10-15 hrs from
> start) , i use this Perform GC option this drastically reduse memory
> usage and performs normally. Does anybody know a software command / or
> interface or something else which can be used in program , that will
> be invoked after lets say 15 hrs to perform garbage collection .
> 
> 2) Serial port stops working (tx LED on base mote stops blinking as
> well as serialforwarder window stops receiving packets , java program
> halts.)
> Had anybody faced similar problem ??  When this happened to me i used
> stop server option on serial forwarder GUI .
> Then i got some fatal error . I dont know anything about this error .
> I am attaching the file generated after error.
> 
> Please help me in this issue.
> 
> Thanks a lot in advance.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to