Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Android
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Android
Using WeakReferences in Android
Pho Tek
Ranch Hand
Posts: 782
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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.
Leandro Coutinho
Ranch Hand
Posts: 430
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Weak references are used to prevent circular references too.
Ed Burnette
Author
Posts: 142
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
Hello Android
Blog:
ZDNet's Dev Connection
- Twitter:
@eburnette
Consider Paul's
rocket mass heater
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
a simple WeakReference and SoftReference exemple
Android Questions
A question on WeakHashMap - From Oracle docs.
java.lang.ref ?
Is orphaned clients really matter!
More...