MJ

Case study · Author & speaker

Leak Hunter demo (FlutterCon Europe 2025)

The open-source demo app and slides behind my FlutterCon Europe talk on advanced memory management in Flutter.

Leak Hunter is the open-source Flutter app I built for my FlutterCon Europe 2025 talk, This App is Built Different: Advanced Memory Management in Flutter. It breaks on purpose: every screen reproduces one memory or performance problem, so it can be measured in Flutter DevTools, explained and fixed live on stage.

Problem

Memory problems in Flutter are easy to talk about and hard to show. Slides can explain garbage collection, but an audience only believes it when they watch the memory chart climb, press the GC button and see that nothing comes back. I needed an app where each problem is isolated, reproducible on demand and reversible, so I could switch between the broken and the fixed version in seconds during a talk.

What the app demonstrates

Architecture

Even a demo app gets read by other developers after a talk, so I structured it like a production codebase: clean architecture with MVVM and Riverpod.

Each demo is a feature folder (leaks, bloat, isolates, rebuilds) with the same three layers, so adding a new scenario means following an existing pattern instead of inventing one. The repository includes an ARCHITECTURE.md that explains the layers and the data flow.

Technologies

Flutter and Dart, flutter_riverpod for state and dependency injection, sensors_plus for the stream-subscription leak, dart:ffi and the ffi package for native memory, leak_tracker for leak events, and Flutter DevTools (Memory and Performance views) to observe everything.

Engineering decisions

Slides and teaching material

The repository also contains the slides for the core idea of the talk: reachable versus unreachable objects. They walk from GC roots (static variables, the call stack, active timers and streams) to why a static cache or an uncancelled timer keeps memory alive, and how the fixed version lets the collector do its job.

What I learned

The full source is on GitHub: maherjaafar/ftcon-25. The talk recording is on the talk page.

GitHub: maherjaafar/ftcon-25

Related talks

Related topics