Hi everybody,

as you know, every time we do a call to drawString() mehod, a new String
is created and we loose some bytes of memory.

Is there any way or trick to avoid this loss of memory in case of we
need to use several calls to drawString().

Imagine a simple loop:

while (!Button.ESCAPE.isPressed()) {
        LCD.clear();
        LCD.drawString("miRobot", 0,0);
        LCD.drawInt( (int)(Runtime.getRuntime().freeMemory()),0,1);
        LCD.refresh();
}

Is there any way to execute this kind of code without loosing all the
memory?

Thanks,
        Carlos

-- 
Carlos E. Agüero Durán  |  Grupo de Sistemas y Comunicacines (GSyC)
http://gsyc.es/~caguero |  Universidad Rey Juan Carlos


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Lejos-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lejos-discussion

Reply via email to