Re: How much RAM would a typical Form object use up?

[email protected]
Newsgroups gmane.comp.java.sun.kvm
Message-ID <8014573.127181204300435612.JavaMail.tomcat@sdcst12.sjc.collab.net>
The form object doesn't use a great deal of ram, it's what you put on it that might. :)
If you have a form that has several components that take a while to build, such as a choicegroup which needs to build it's selection list from RMS, it might be good to leave that component constructed due to the time it will take to rebuild on resuming your midlet.

Which brings me to the real concerns you should look at, construction time on startup. 
While there is a special pause method that is called, there is not a resume method, only the startApp method.   So if your construction time for your screen is not that long you can reduce the amount of logic in your startApp method by just rebuilding everything.   
What you have to do if you need to keep complex or slow gui components around for startup, is rebuild what you need and make sure that the event/command hooks are re-established.  Some devices can cause issues if you leave the command and event listeners, intact when the midlet is in pause mode, so these should be removed in pause and rebuilt in startApp, to avoid your midlet missing actions or dropping the ability to respond to keystrokes.

Have fun.

-Shawn
[Message sent by forum member 'sfitzjava' (sfitzjava)]

http://forums.java.net/jive/thread.jspa?messageID=261637

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff KVM-INTEREST".  For general help, send email to
[email protected] and include in the body of the message "help".
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.