Skip to content

Commit 09ee27d

Browse files
committed
Merge branch 'v3.0' into v3.1
Conflicts: cocos2d/CCNode.m
2 parents 497cbf1 + 058e029 commit 09ee27d

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

cocos2d/CCNode.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ A common user pattern in building a Cocos2d game is to subclass CCNode, add it t
108108
NSMutableArray *_children;
109109

110110
// Weak ref to parent.
111-
CCNode *__unsafe_unretained _parent;
111+
__weak CCNode *_parent;
112112

113113
// A tag any name you want to assign to the node
114114
NSString* _name;
@@ -373,7 +373,7 @@ A common user pattern in building a Cocos2d game is to subclass CCNode, add it t
373373
-(void) removeAllChildrenWithCleanup:(BOOL)cleanup;
374374

375375
/** A weak reference to the parent. */
376-
@property(nonatomic,readwrite,unsafe_unretained) CCNode* parent;
376+
@property(nonatomic,readwrite,weak) CCNode* parent;
377377

378378
/** Array of child nodes. */
379379
@property(nonatomic,readonly) NSArray *children;

cocos2d/CCNode.m

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,6 @@ - (NSString*) description
221221
- (void) dealloc
222222
{
223223
CCLOGINFO( @"cocos2d: deallocing %@", self);
224-
225-
// children
226-
for (CCNode* child in _children)
227-
child.parent = nil;
228-
229-
230224
}
231225

232226
#pragma mark Setters

0 commit comments

Comments
 (0)