Differences From Artifact [8d40ffbf81]:
- File
src/OFData.m
— part of check-in
[81156ee75a]
at
2018-02-25 17:16:23
on branch trunk
— No self = [self init…] with self-releasing @catch
When using self = [self init…], this already releases self on an
exception, so using it inside of a @try / @catch block that releases
self would lead to a double-release. (user: js, size: 14287) [annotate] [blame] [check-ins using]
To Artifact [b6b253b742]:
- File src/OFData.m — part of check-in [d4d9072480] at 2018-04-07 14:13:48 on branch trunk — Add OFSecureData (user: js, size: 14287) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
128 129 130 131 132 133 134 | { self = [super init]; @try { if (itemSize == 0) @throw [OFInvalidArgumentException exception]; | < < > > | | 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | { self = [super init]; @try { if (itemSize == 0) @throw [OFInvalidArgumentException exception]; _items = [self allocMemoryWithSize: itemSize count: count]; _itemSize = itemSize; _count = count; memcpy(_items, items, count * itemSize); } @catch (id e) { [self release]; @throw e; } return self; } |
︙ | ︙ |