Skip to content

Commit

Permalink
error fixed : replace [[self copy] allocWithZone] to [[self class]
Browse files Browse the repository at this point in the history
allocWithZone].
  • Loading branch information
ChenYilong committed Aug 12, 2015
1 parent ffec8a8 commit b4fb74c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ atomic属性通常都不会有性能瓶颈。

```Objective-C
- (id)copyWithZone:(NSZone *)zone {
CYLUser *copy = [[[self copy] allocWithZone:zone]
CYLUser *copy = [[[self class] allocWithZone:zone]
initWithName:_name
age:_age
sex:_sex];
Expand Down Expand Up @@ -405,7 +405,7 @@ atomic属性通常都不会有性能瓶颈。
}

- (id)copyWithZone:(NSZone *)zone {
CYLUser *copy = [[[self copy] allocWithZone:zone]
CYLUser *copy = [[[self class] allocWithZone:zone]
initWithName:_name
age:_age
sex:_sex];
Expand All @@ -414,7 +414,7 @@ atomic属性通常都不会有性能瓶颈。
}

- (id)deepCopy {
CYLUser *copy = [[[self copy] allocWithZone:zone]
CYLUser *copy = [[[self class] allocWithZone:zone]
initWithName:_name
age:_age
sex:_sex];
Expand All @@ -435,7 +435,7 @@ atomic属性通常都不会有性能瓶颈。


- (id)deepCopy {
CYLUser *copy = [[[self copy] allocWithZone:zone]
CYLUser *copy = [[[self class] allocWithZone:zone]
initWithName:_name
age:_age
sex:_sex];
Expand Down

0 comments on commit b4fb74c

Please sign in to comment.