fix: memory leak due to missing unsubscribe (#12777)

- unsubscribe `Signal` not correctly
- missing un-subscription for `Livedata.signal`

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Improved resource management to ensure subscriptions are properly
cleaned up, reducing potential memory leaks and improving overall app
stability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Cats Juice
2025-06-12 12:35:14 +08:00
committed by GitHub
parent 2a9f7e1835
commit 2d17c265ca
2 changed files with 6 additions and 6 deletions

View File

@@ -541,9 +541,7 @@ export class AffineToolbarWidget extends WidgetComponent {
);
});
return () => {
subscription.unsubscribe();
};
disposables.add(subscription);
})
);