harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiao-Feng Li" <xiaofeng...@gmail.com>
Subject Re: [General VM] GC strategy:how to garbage collect short-lived objects quickly.
Date Tue, 19 Sep 2006 00:22:01 GMT
On 9/18/06, Oliver Deakin <oliver.deakin@googlemail.com> wrote:
> Xiao-Feng Li wrote:
> > On 9/14/06, Jimmy, Jing Lv <firepure@gmail.com> wrote:
> >> Interesting topic, I'm still dreaming of "free()" in Java (This dream
> >> begins at the very beginning when I see Java, as C/C++ is my first
> >> program language )However, it seems RI will never give us "free()". :)
> >>
> >> Only a thought, Java may offer a key word "temp", indicating that this
> >> variety can be freed at once.
> >
> >
> > Well, it is not so easy to support "free()" in JVM as it looks like,
> > and may not really bring benefit. Even worse, it may introduce unsafe
> > code, which was one of the major design goals of Java/JVM. That said,
> > I agree that some hints by programmer to assist GC might be an
> > interesting topic.
> There are always weak references to help out with short lived objects -
> you know they will be collected fairly soon (should be within a few
> gc cycles) - and soft references for longer lived ones. That's
> about as close to free() as youll get for now!
> Regards,
> Oliver

I don't understand. How can weak references help short-lived objects reclaim?


Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org

View raw message