Can it be also applied to the C/C++ ? On Monday, January 18, 2010 10:24:01 PM UTC+9, vivekkm wrote: > > Hi, > > Weak reference objects, do not prevent their referents from being made > finalizable, finalized, and then reclaimed. An example usage is in an > application that is high on processing of images and you do not want > to load an image from file system every time. so, you want to build a > cache of images in the application. So, use weak references for > accessing images in the cache. > > Each ordinary reference in Java is a strong reference. Strong > reference objects prevent the GC from removing the object, if it is > reachable with a chain of strong references. > > I found more details here: > http://saeedsiam.blogspot.com/2009/02/weakreference-what-is-that.html > > br, > vivek. > > ly niu wrote: > > Hi friends: > > During reading the Android code, I am unclear about the strong reference > and > > weak reference in Refbase.h. > > > > who can give a summary about the strong reference and weak reference? > What > > is the difference and what is the usage in different condition? > > > > Another what is the difference between OBJECT_LIFETIME_FOREVER and > > OBJECT_LIFETIME_WEAK? > > > > > > Thanks > > Regards > >
-- You received this message because you are subscribed to the Google Groups "Android Discuss" group. To view this discussion on the web visit https://groups.google.com/d/msg/android-discuss/-/ySCBvjY3oO8J. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/android-discuss?hl=en.
