~/talk

Advanced techniques for concurrency & memory management (en)

Talkat Droidcon Paris 2015 · 2015-11-09..11-10· [android]
speakerdeck:nhachicha
slides:none on file

Claims concrete patterns from building Realm database and shows what actually works: using ReferenceQueue with PhantomReference to write near‑deterministic GC unit tests (keep a strong reference to the Reference object), avoiding finalizers, and pitfalls of WeakHashMap keys (strings, boxed ints, defensive copies). Presents working IPC alternatives: PendingIntent, Messenger, ResultReceiver and warns against EventBus/global state. Gives testable threading techniques: HandlerThread + CountDownLatch or IdleHandler/Executor tricks, and reusable coordination with Phaser as reusable barrier (onAdvance callback).

AI-written summary · about

  1. 0:00Intro
  2. 0:17Realm
  3. 1:18WeakHashMap
  4. 4:54java.lang.ref.Reference
  5. 7:03ReferenceQueue
  6. 9:24Finalizer
  7. 11:05PhantomReference
  8. 17:06Write deterministic tests involving GC
  9. 17:51IdentityHashMap
  10. 21:131. Activity create a Handler
  11. 22:40EventBus
  12. 24:14Test Runner
  13. 30:32Looper & Unit test
  14. 30:46CountDownLatch
  15. 32:13CyclicBarrier
  16. 35:45Phaser
  17. 40:02Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.