Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
> Correct me if I am wrong, but won't the WeakReferenced objects be reclaimed by GC only if it is running low on memory and do not have any other strong references?. You might want to start your command line program with > java -Xmx1M <- restrict your VM to 1 MB memory. No. You can force GC by invoking the static method gc() on the System object. eg: System.gc(); This makes it easy to test wrefs.
Replies:
|
Sponsored Links
|