This page was last modified 10:12, 23 August 2007.
KIJ000080 - Garbage collecting
From Forum Nokia Wiki
Garbage collecting KIJ000080
Platform: S60 2nd Edition Device: Nokia 6600
Description:
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!
Solution:
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:
System.gc();
Thread.sleep(delay); //delay = 20-50 ms
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| play chess over bluetooth ,sms | haamoon | Mobile Java General | 3 | 2007-09-28 13:52 |
| Blank Screen Emulator | mubx2000 | Symbian Tools & SDKs | 3 | 2006-12-24 06:44 |
| Reading a .txt file from jar without knowing the size of the file ! | ionutianasi | Mobile Java General | 12 | 2004-06-24 00:27 |
| NMSS 1.5 trouble | x_2001 | General Messaging | 9 | 2005-05-18 23:30 |
| Firmware 3510i | clive@incognitogames.com | General Discussion | 0 | 2004-01-22 02:24 |

