Skip to content

Timer Memory Leak #1138

@zaelgohary

Description

@zaelgohary

Issue: Timer not properly cancelled in all scenarios
Risk: Memory leaks and background processing after screen disposal
Fix: Ensure timer cancellation in all exit paths

// Current: Timer may not be cancelled in all scenarios
timeoutTimer() async {
  if (!mounted) {
    timer.cancel();
    return;
  }
  // Timer continues if other conditions are met
}

// Fix: Ensure timer cancellation
@override
void dispose() {
  timer.cancel();
  super.dispose();
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions