Hello,
Can anyone tell me (or point me to a url) how heap memory is allocated when a midlet starts up?
I have a midlet that now gives an out of memory error whilst it is starting up. It seemed to be (tho this may be where my poor knowledge of the JVM/whatever is letting me down) that the error is thrown whilst it going through the (many) instance variables. I think this because the first lines of my constructor and startApp() methods are System.err.println's - and no such output is ever made to the output screen - so I concluded that the constructor and startApp() were never reached, so it must be the declaration of my instance variables that was gobbling up all the memory (only a few of my instance variables are initialised at the point of declaration).
So I created a
test midlet that contained the same instance variables, an empty constructor, and the only methods being an empty startApp(), pauseApp() and destroyApp(). I expected that if I ran this it would give me the same out of memory error - but the result was that it ran fine with bags of free memory...
...which proves I have no idea of what's going on!
Can anyone help me out?!
Cheers,
James