aboutsummaryrefslogtreecommitdiff
path: root/objectivec/GPBArray.m
diff options
context:
space:
mode:
Diffstat (limited to 'objectivec/GPBArray.m')
-rw-r--r--objectivec/GPBArray.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/objectivec/GPBArray.m b/objectivec/GPBArray.m
index ae57747d..f401631d 100644
--- a/objectivec/GPBArray.m
+++ b/objectivec/GPBArray.m
@@ -2519,14 +2519,14 @@ static BOOL ArrayDefault_IsValidValue(int32_t value) {
- (id)copyWithZone:(NSZone *)zone {
if (_array == nil) {
- _array = [[NSMutableArray alloc] init];
+ return [[NSMutableArray allocWithZone:zone] init];
}
return [_array copyWithZone:zone];
}
- (id)mutableCopyWithZone:(NSZone *)zone {
if (_array == nil) {
- _array = [[NSMutableArray alloc] init];
+ return [[NSMutableArray allocWithZone:zone] init];
}
return [_array mutableCopyWithZone:zone];
}