Skip to content

Issue-94 Resolved memory leak by adding weak to parent CameraManager #104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

samdogg7
Copy link

Resolves memory leak mentioned in Issue 94

@@ -27,7 +27,7 @@ extension CameraManagerMotionManager {
}
private extension CameraManagerMotionManager {
func handleAccelerometerUpdates(_ data: CMAccelerometerData?, _ error: Error?) {
guard let data, error == nil else { return }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe with all of that, the ! should be removed from:

    private(set) weak var parent: CameraManager!

We should not pretend it can not be nil if it can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants