Using the Memory view

Tools

DevTools

Using the Memory view

Reasons to use the memory view

Basic memory concepts

Root object, retaining path, and reachability

Root object
Reachability
Retaining path
Example


Shallow size vs retained size
Dart size vs external (native) size
Memory leaks happen in Dart?

Why garbage collector cannot prevent all leaks?
Why closures require extra attention
Why BuildContext requires extra attention
How to fix leak prone code?
General rule for BuildContext


Memory leak vs memory bloat

Memory view guide

Expandable chart

Memory anatomy
Memory overview chart


Profile tab
Diff tab
Trace tab

Bottom up vs call tree view

Other resources