Skip to content
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
suggestied/fix-memory-leaks
Feb 25, 2025
Merged

Fix memory leaks in various components#21
suggestied merged 2 commits intodevelopfrom
suggestied/fix-memory-leaks

Conversation

@suggestied
Copy link
Copy Markdown
Member

@suggestied suggestied commented Feb 25, 2025

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.

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 lammersluc closed this Feb 25, 2025
@lammersluc lammersluc reopened this Feb 25, 2025
@suggestied suggestied merged commit 6c27cb7 into develop Feb 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants