leak_tracker 1.0.0-dev.1.0 copy "leak_tracker: ^1.0.0-dev.1.0" to clipboard
leak_tracker: ^1.0.0-dev.1.0 copied to clipboard

unlisted

A framework for memory leak tracking for Dart and Flutter applications.

CI

Memory Leak Tracker #

This is a framework for memory leak tracking for Dart and Flutter applications.

Coming soon! See https://github.com/flutter/devtools/issues/3951.

The text below this sentence is under construction.

Getting started #

To track memory leaks in your Flutter application:

  1. Before runApp invocation, enable leak tracking, and connect the Flutter memory allocation events:
import 'package:flutter/foundation.dart';
import 'package:leak_tracker/leak_tracker.dart';

...

enableLeakTracking();
MemoryAllocations.instance
      .addListener((ObjectEvent event) => dispatchObjectEvent(event.toMap()));
runApp(...

  1. Run application in debug mode and watch for a leak related warnings. If you see a warning, open the link to investigate the leaks.

TODO(polina-c): add example of the warning

See more on memory leaks and leak tracking at Dart memory leak tracker.

116
likes
0
pub points
98%
popularity

Publisher

verified publishertools.dart.dev

A framework for memory leak tracking for Dart and Flutter applications.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

clock, collection, meta, vm_service

More

Packages that depend on leak_tracker