Index: src/OFDataArray.m ================================================================== --- src/OFDataArray.m +++ src/OFDataArray.m @@ -130,14 +130,12 @@ capacity: (size_t)capacity { self = [super init]; @try { - if (itemSize == 0) { - [self release]; + if (itemSize == 0) @throw [OFInvalidArgumentException exception]; - } _items = [self allocMemoryWithSize: itemSize count: capacity]; _itemSize = itemSize; @@ -710,14 +708,12 @@ self = [super init]; @try { size_t size, lastPageByte; - if (itemSize == 0) { - [self release]; + if (itemSize == 0) @throw [OFInvalidArgumentException exception]; - } if (capacity > SIZE_MAX / itemSize) @throw [OFOutOfRangeException exception]; lastPageByte = [OFSystemInfo pageSize] - 1;