A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Using WeakReferences in Android
Joined: Nov 05, 2000
Mar 11, 2009 20:18:05
I understand that WeakReferences are especially suited to implement Caches.
Are there other scenarios whereby WeakReferences are suitable on a mobile platform like Android ?
I understand that Android reclaims memory itself by killing processes.
Joined: Mar 04, 2009
Mar 11, 2009 21:43:20
Weak references are used to prevent circular references too.
Joined: Jun 10, 2003
Mar 12, 2009 09:34:16
Android's Dalvik VM does garbage collection just like your desktop version of Java SE does.
In addition to that, when memory gets tight, paused applications can be killed. If they're needed later they are reconstituted from saved state.
Ed Burnette, Author of
ZDNet's Dev Connection
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: Using WeakReferences in Android
Hand-over-hand locking in SCJD book example
Upgaring to Android 2.0
WA #1.....word association
How to check incoming message ?
WA #2 ..... word association
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014