On Aug 7, 2006, at 2:40 PM, Sam Kong wrote: > I want each integer to remember if it's a prime number or not. > As the calculation uses cache of smaller prime numbers, it runs fast. > But I'm not sure if the cache is preserved after GC runs (when nothing > refers to the integers). > If the cache is not preserved, it's no use. IIRC an Integer's instance variables are eternal due to various implementation details. -- Eric Hodel - drbrain / segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com