I have a JAR at the limit size that is 64K.
Classes (uncompressed) consumes 44K.
When I start application, it says free memory is 164K. So 164K + 44K = 208K. That is very close to the heap specification of the phone (210K).
Is it correct to assume JVM loads all classes into heap before running ? Does it only load the method code, and static members ? When I instantiate an object, it allocates space for class members -non-statics- ? correct ?
Is it possible to release the space allocated for a class ? e.g. I dont need any functionality of title screen code.
To make myself sure, it isnt possible to read a resource as a stream (not in a java sense, i mean block by block) without loading all of its data to heap, is it ?
Is it a little bit hard to find a way around to optimize memory usage on Series40 ? or do I miss something ? :) That is probably I was working on Series60 and forget to test it on Series40 till the application is about to be completed.