This site requires JavaScript, please enable it in your browser!
Greenfoot back
Gevater_Tod4711
Gevater_Tod4711 wrote ...

2012/8/26

Is there a way to instrict greenfoot to reserve more RAM?

1
2
Gevater_Tod4711 Gevater_Tod4711

2012/8/29

#
@Builderboy2005 Yes I always did it with the method setImage("...") but now I have changed it like SPower tould me. But let me ask one question: If I use setImage("...") whats up with the older image I had before. Isn't there the java GC that gives the memory back?
SPower SPower

2012/8/29

#
That's true, GC will sometime give the memory back, but unfortunately GC doesn't do that immediately like Reference Counting would.
Gevater_Tod4711 Gevater_Tod4711

2012/8/29

#
Oh I didn't know that. Is there a way to instruct the GC to give the memory back like delete in C++.
SPower SPower

2012/8/29

#
The only way I know to do something with the same effect is calling this method:
System.gc();
which runs the GC manually.
Builderboy2005 Builderboy2005

2012/8/30

#
It does *not* run the Garbage collector manually, it just requests that the garbage collector be run. There is still no promise that any garbage will be collected.
SPower SPower

2012/8/30

#
@builderboy Didn't know that, thanks for the lesson!
You need to login to post a reply.
1
2