All ALAssets
objects are deallocated when the ALAssetsLibrary
that obtained them goes out of scope. If you want to do what you're doing, you'll need to keep a strong reference to library
, and then deallocate library
when you're done with it.
(In your case, they deallocate at the end of viewDidLoad
.)