~/talk

Let’s Talk About Memory Leaks In Dart And Flutter

Talkat Fluttercon Europe 2025 · 2025-09-24..09-26· [flutter, web-performance]
slides:none on file

Explains Dart’s generational GC and mark‑and‑sweep behavior, shows how holding a BuildContext or static caches prevents reclamation, and demonstrates patterns that work: weak reference and weak map for caches, finalizers to free native FFI resources, replacing repeated string/list allocations with StringBuffer or lazy builders to cut allocations, and using DevTools plus Leak Tracker in unit tests to detect disposed‑but‑not‑garbage‑collected objects before production.

AI-written summary · about

  1. 0:00Introduction
  2. 1:27Memory leaks vs bloating
  3. 3:52Dart GC fundamentals
  4. 9:39Risky Flutter objects
  5. 14:48Patterns to prevent leaks
  6. 18:21Finalizers and cleanup
  7. 21:13Streams and futures safely
  8. 23:40String concatenation efficiency
  9. 26:14Lazy loading
  10. 27:41Early detection with testing
  11. 30:30Memory snapshots
  12. 31:36DevTools debugging
  13. 32:41Static analysis
  14. 33:23Summary
~/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.