Revision as of 13:11, 23 August 2007 by Forum Nokia KB (Talk | contribs)

Archived:Garbage collecting prohibitively slows S60 2nd Edition (Known Issue)

From Nokia Developer Wiki
Jump to: navigation, search

Garbage collecting KIJ000080

Platform: S60 2nd Edition Device: Nokia 6600


Calling the System.gc() method results in extreme slowness and jamming. In Monty 1.0 VM, garbage collection is different and every time System.gc is called, the entire memory is really cleared. This is an extremely slow process!


Do not call the System.gc method at all, or call the System.gc() garbage collecting method only in non-time-critical situations, such as screen transitions, state transitions, pause states, etc. If the System.gc() method is used, it is recommended to add a short delay (~20-50 ms) after the method call to ensure the sufficient time for the garbage collection, as in the following example:


 Thread.sleep(delay); //delay = 20-50 ms

74 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.