withDisposalStackTrace method

  1. @useResult
LeakTesting withDisposalStackTrace()

Copies with enabled collection of disposal stack trace.

Stack trace of the leaked object disposal will be added to diagnostics.

Implementation

@useResult
LeakTesting withDisposalStackTrace() {
  return copyWith(
    leakDiagnosticConfig: leakDiagnosticConfig.copyWith(
      collectStackTraceOnDisposal: true,
    ),
  );
}