Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

garbage collection in J2ME

 
George Brown
Ranch Hand
Posts: 919
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Considering the necessity for an even more conservative use of memory in devices with limited memories, has the garbage collection in J2ME been correspondingly improved or altered?
 
Matt Midcap
Sheriff
Posts: 440
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi George,
I'll have to look into this. Maybe the other Matt knows and could offer some insight too.
Matt
 
shailesh sonavadekar
Ranch Hand
Posts: 1874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes . George , it ie. It has to . Otherwise from where you will get the response time. your mark & sweep alogorithm doesn't work here. it is just beginning. It is more improve in CLDC than that in case of KVM last year. Many concepts like handles are not there in j2me. you have pointers. You don't have awt & swing . Your footprint is just 40 to 100 kb.
i hope this is useful.
 
George Brown
Ranch Hand
Posts: 919
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pointers in J2ME! rather than references? really? is there something in the form of a Sun URL I can look at about that?
 
Eric Giguere
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The biggest think in terms of the CLDC is that finalization has been removed -- when objects are garbage collected they don't get a chance to run their finalization code. This simplified the implementation of the garbage collector. But other than that, the usual techniques of helping the garbage collector along by nulling out references, not allocating too many objects, and reusing objects whenever possible are all important with J2ME programming, whether CLDC- or CDC-based.
Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic