Skip to content

Commit cd06292

Browse files
committed
Fixing a possible dangling pointer in CCTableView callbacks.
Former-commit-id: 4a25f4e
1 parent 9aa36f1 commit cd06292

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cocos2d-ui/CCTableView.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ - (void) onEnter
385385

386386
- (void) setTarget:(id)target selector:(SEL)selector
387387
{
388-
__unsafe_unretained id weakTarget = target; // avoid retain cycle
388+
__weak id weakTarget = target; // avoid retain cycle
389389
[self setBlock:^(id sender) {
390390
objc_msgSend(weakTarget, selector, sender);
391391
}];

0 commit comments

Comments
 (0)