Robin Rosenberg escreveu:
onsdagen den 6 februari 2008 skrev Shawn O. Pearce:
Use Integer.valueOf(int). Post Java 5 implementations of the J2SE
are required to cache values between -128 and 127 (inclusive).
Actually, when the Java compiler autoboxes values it does so through
these static valueOf methods, which were mostly introduced as part
of the Java 5 API updates. For small common values its cached and
will thus avoid garbage generation, for less common values it goes
back to allocating the object.
Thank you for this information.
-- robin
Yep, this is very good to know. Thanks from me too :)
This patches series looks fine to me.
[]s,
Roger.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html