Skip to content

Commit f4adb60

Browse files
committed
Fixed issue #10 where there's a potential retain cycle from acquiring delegate/datasource.
1 parent 64f9c6a commit f4adb60

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

FZAccordionTableView/FZAccordionTableView.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ - (void)touchedHeaderView:(UITapGestureRecognizer *)recognizer {
9595

9696
@interface FZAccordionTableView() <UITableViewDataSource, UITableViewDelegate, FZAccordionTableViewHeaderViewDelegate>
9797

98-
@property id<UITableViewDelegate, FZAccordionTableViewDelegate> subclassDelegate;
99-
@property id<UITableViewDataSource> subclassDataSource;
98+
@property (weak, nonatomic) id<UITableViewDelegate, FZAccordionTableViewDelegate> subclassDelegate;
99+
@property (weak, nonatomic) id<UITableViewDataSource> subclassDataSource;
100100

101101
@property (nonatomic) BOOL numberOfSectionsCalled;
102102
@property (strong, nonatomic) NSMutableSet *mutableInitialOpenSections;
@@ -150,7 +150,7 @@ - (void)removeOpenedSection:(NSInteger)section {
150150

151151
- (NSArray *)getIndexPathsForSection:(NSInteger)section {
152152

153-
NSInteger numOfRows = [self.sectionInfos[section] numberOfRows];
153+
NSInteger numOfRows = [self.sectionInfos[section] numberOfRows];
154154
NSMutableArray *indexPaths = [NSMutableArray array];
155155
for (int row = 0; row < numOfRows; row++) {
156156
[indexPaths addObject:[NSIndexPath indexPathForRow:row inSection:section]];

0 commit comments

Comments
 (0)