Memory usage of primitive types

Hello,

can anyone tell me if I understood the usage of memory right in the following points:

1) When I use local Variables like byte or short. These variables are created on the Stack and so they are in RAM and quick to read and write. I do not have to care about them and about garbage collection.

2) When I create a class variable of a primitive type it is allocated in eeprom.

Her is a Problem I have got:

How can I create a Variable of a primitive type that is cleared when the applet is deselected. Do I have to create a transient CLEAR_ON_DESELECT byte[] with the length one or is there an easier way. To keep a session specific status that is reset on deselect?

What about a Cipher that should be cleare after the applet is deselected?

thanks in Advance

Christian

[834 byte] By [Soulman1977] at [2007-9-26 3:18:03]
# 1
Yes, everything is correct. Transient array is the only way.
Alb at 2007-6-29 11:31:47 > top of Java-index,Java Mobility Forums,Consumer and Commerce...