hello,
i want to know what is the overhead, in using a static class with some static members, in j2me during the whole lifecycle of the midlet..
Also do tell me if any other problem persists....
hello,
i want to know what is the overhead, in using a static class with some static members, in j2me during the whole lifecycle of the midlet..
Also do tell me if any other problem persists....
i believe that static classes are less resource intensive that instantiable ones. theres no construction involved and no references for the vm to use so in theory id say there are certain perfomance gains to be had if used properly, someone please correct me if im wrong
Made With Caffiene And Sleepless Nights
Static methods and variables are usually very fast. However it's not wise to keep large objects in static fields, since those remain alive for the whole MIDlet life, preventing these large objects from being released and garbage-collected.
So, the rule of thumb is: methods and small objects is ok. Large objects = not OK.
Daniel