• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

garbage collection

 
Mehdi Chaouachi
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can somebody point me a description of garbage collection in cldc, I didn't find it in the spec!!!
 
Mehdi Chaouachi
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No body replied, does this mean that every body knows the answer and is lazy to answer, or does it mean that no body knows how does it work in cldc?
 
Terence Doyle
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
gc() works the same in J2ME as J2SE as far as I can see from specs.

It seems to me that calling gc()at specific points in an application may be mode important on CLDC hardware.

Hope that helps,
 
dbala subramaniam
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi There is no finalize() method support on CLDC , it meant that
there is no garbage collection in CLDC
with regards
bala
 
Michael Zhao
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Class Runtime
Since:
JDK1.0, CLDC 1.0
gc
public void gc()
Runs the garbage collector. Calling this method suggests that the Java Virtual Machine expend effort toward recycling unused objects in order to make the memory they currently occupy available for quick reuse. When control returns from the method call, the Java Virtual Machine has made its best effort to recycle all discarded objects.
The name gc stands for "garbage collector". The Java Virtual Machine performs this recycling process automatically as needed even if the gc method is not invoked explicitly.
The method System.gc() is the conventional and convenient means of invoking this method.
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mehdi Chaouachi:
No body replied, does this mean that every body knows the answer and is lazy to answer, or does it mean that no body knows how does it work in cldc?

I think mixtures of them are here! I guess the second groupd is larger than the first...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic