Skip to content

Commit 241e56f

Browse files
committed
Fixing a leak associated with collision delegate methods. (Thanks jjextra)
Former-commit-id: a2e0159
1 parent f8e3313 commit 241e56f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cocos2d/CCPhysicsNode.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ -(BOOL)ignore
9595
/// Internal class used to wrap cpCollisionHandlers
9696
@interface CCPhysicsCollisionHandler : NSObject {
9797
cpCollisionHandler *_handler;
98-
id _delegate;
98+
__weak id _delegate;
9999

100100
// Cache the CCPhysicsNode's collision pair singleton.
101101
CCPhysicsCollisionPair *_collisionPairSingleton;

0 commit comments

Comments
 (0)