carp-dk / carp-dk/carp_study_app
fix(leak): Sensing debug measurement listener survives removeStudy()
- Dominant language
- Dart
- Stars
- 10
- Forks
- 5
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 14
Description
## Problem
(verified) `controller?.measurements.listen(...)` in `tryDeployment()` is unstored (`lib/blocs/sensing.dart:177-181`); each deployment attempt (including StudyPage pull-to-refresh, which calls `tryDeployment()` — `lib/ui/pages/study_page.dart:46`) adds another console-mirroring listener.
## Proposed fix
Store the subscription on `Sensing`, cancel it in `removeStudy()` and before re-subscribing in `tryDeployment()`.
## Acceptance criteria
- [ ] Repeated `tryDeployment()` calls keep one debug listener
- [ ] `removeStudy()` cancels it
**Effort:** S · **Priority:** P2 · **Change risk:** Low
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.