Skip to content

Commit

Permalink
fix: PhotosViewController shouldn’t retain its data source
Browse files Browse the repository at this point in the history
This would lead too easily to difficult-to-manage retain cycles.
  • Loading branch information
Chris Dzombak committed Feb 2, 2017
1 parent 18b5296 commit bdf5fe0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions NYTPhotoViewer/NYTPhotosViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,8 @@ extern NSString * const NYTPhotosViewControllerDidDismissNotification;
* The data source underlying this PhotosViewController.
*
* After setting a new data source, you must call `-reloadPhotosAnimated:`.
*
* The data source is retained (unlike UITableView's data source).
*/
@property (nonatomic) id <NYTPhotoViewerDataSource> dataSource;
@property (nonatomic, weak, nullable) id <NYTPhotoViewerDataSource> dataSource;

/**
* The object conforming to `NYTPhoto` that is currently being displayed by the `pageViewController`.
Expand Down

0 comments on commit bdf5fe0

Please sign in to comment.