This repository was archived by the owner on Jul 17, 2025. It is now read-only.
Fix memory leaks in various components#21
Merged
suggestied merged 2 commits intodevelopfrom Feb 25, 2025
Merged
Conversation
Fix memory leaks in various parts of the application. * **Camera Cubit**: Dispose `CameraController` in the `close` method in `lib/presentation/blocs/camera/camera_cubit.dart`. * **Camera Controller**: Clear previous selections in the `pickImages` method in `lib/controllers/camera_controller.dart`. * **Settings Account Controller**: Clear previous selections in the `pickImage` method in `lib/controllers/settings_account_controller.dart`. * **Wardrobe Page**: Dispose of resources or controllers in the `dispose` method in `lib/ui/screens/wardrobe/page.dart`. * **Camera Page**: Dispose of resources or controllers in the `dispose` method in `lib/ui/screens/camera/page.dart`. * **Lookbook Page**: Convert `LookbookScreen` to a `StatefulWidget` and dispose of resources or controllers in the `dispose` method in `lib/ui/screens/lookbook/page.dart`. * **Settings Page**: Convert `SettingsScreen` to a `StatefulWidget` and dispose of resources or controllers in the `dispose` method in `lib/ui/screens/settings/page.dart`. * **Wardrobe Item Page**: Convert `WardrobeItemPage` to a `StatefulWidget` and dispose of resources or controllers in the `dispose` method in `lib/ui/screens/wardrobe_item/page.dart`. * **Account Page**: Dispose of resources or controllers in the `dispose` method in `lib/ui/screens/wardrobe/settings/account_page.dart`. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/OpenWardrobe/app/tree/develop?shareId=XXXX-XXXX-XXXX-XXXX).
lammersluc
approved these changes
Feb 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix memory leaks in various parts of the application.
CameraControllerin theclosemethod inlib/presentation/blocs/camera/camera_cubit.dart.pickImagesmethod inlib/controllers/camera_controller.dart.pickImagemethod inlib/controllers/settings_account_controller.dart.disposemethod inlib/ui/screens/wardrobe/page.dart.disposemethod inlib/ui/screens/camera/page.dart.LookbookScreento aStatefulWidgetand dispose of resources or controllers in thedisposemethod inlib/ui/screens/lookbook/page.dart.SettingsScreento aStatefulWidgetand dispose of resources or controllers in thedisposemethod inlib/ui/screens/settings/page.dart.WardrobeItemPageto aStatefulWidgetand dispose of resources or controllers in thedisposemethod inlib/ui/screens/wardrobe_item/page.dart.disposemethod inlib/ui/screens/wardrobe/settings/account_page.dart.For more details, open the Copilot Workspace session.