verifyNoLeaks static method

void verifyNoLeaks()

Throws a LeakTrackerException if any leaks are currently tracked.

This is typically used at validation boundaries such as test teardown.

Implementation

static void verifyNoLeaks() {
  final leaks = snapshot;
  if (leaks.isEmpty) return;
  throw LeakTrackerException(leaks: leaks, filter: _filter);
}