quote:
Original post by Anonymous Poster
Garbage collection shouldn''t take _too_ long, System.gc() will return practically straight away, but it might not have done anything (it''s merely a request). So if you _know_ that you have garbage to collect you can sit in a while loop untill you have more free memory.
Er yea, System.gc() returns stright away cuss it forks a thread! You still have to account for the load caused by it, thus its aways a bad idea to gc in a loop unless you check that the last thread has been killed.