Skip to content

Commit

Permalink
Fix a memory leak issue with the presentationController.
Browse files Browse the repository at this point in the history
  • Loading branch information
tiper committed May 27, 2022
1 parent 7afbaa1 commit e4ea6aa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/Controller/ImagePickerController+Closure.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ import Photos
// And since we are using the blocks api. Set ourselfs as delegate
imagePicker.imagePickerDelegate = imagePicker

// Invoke presentationController before actually presenting to fix a memory leak issue.
_ = imagePicker.presentationController

// Present
self.present(imagePicker, animated: animated, completion: completion)
}
Expand Down

0 comments on commit e4ea6aa

Please sign in to comment.