~/talk

Memory Leaks & Performance Considerations: A Cookbook

Talkat droidcon Berlin 2022 · 2022-07-06..07-08· [web-performance, android]
slides:none on file

Android apps leak memory when background work outlives UI lifecycles; coroutines can leak too unless using structured concurrency and cancelable scopes. Practical fixes include using LeakCanary and Android Profiler, nulling view references (e.g. call MapView.destroy), avoiding static Contexts, and preferring coroutine scopes with a CoroutineExceptionHandler or SupervisorJob. AsyncTask (deprecated 2019) and improperly bound services commonly cause leaks. Kotlin bug KT-1622 is fixed in Kotlin 1.4, and the O’Reilly book "Programming Android with Kotlin: Achieving Structured Concurrency with Coroutines" documents patterns.

AI-written summary · about

  1. 0:00Introduction to memory leaks
  2. 1:53History of memory leaks
  3. 3:38Memory leaks in Android
  4. 5:45Why memory leaks matter
  5. 7:31Self-managed memory environment
  6. 10:44Explicit vs implicit leaks
  7. 12:30AsyncTask and memory leaks
  8. 16:20Implicit leaks in coroutines
  9. 17:23Thread pool executors
  10. 20:51Thread cancellation issues
  11. 23:58Coroutine exception handling
  12. 26:46Leak Canary demonstration
  13. 30:01Key lessons and best practices
  14. 32:51Summary and resources
~/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.