Differences From Artifact [db633d72e6]:
- File
src/OFString.m
— part of check-in
[e959fed010]
at
2009-04-26 12:44:20
on branch trunk
— A few renames in OFObject.
getMemWithSize: -> allocWithSize:
getMemForNItems:ofSize: -> allocNItems:withSize:
resizeMem:toNItems:ofSize: -> resizeMem:toNItems:withSize: (user: js, size: 9077) [annotate] [blame] [check-ins using]
To Artifact [8c5b52d99d]:
- File
src/OFString.m
— part of check-in
[e9d48d0beb]
at
2009-05-01 18:15:32
on branch trunk
— Call [super free] on error in init methods.
Reason is that - free might free stuff which is allocated during the
initialization, which might not be allocated when an error occurred. (user: js, size: 9078) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
164 165 166 167 168 169 170 | @throw [OFInvalidEncodingException newWithClass: c]; } @try { string = [self allocWithSize: length + 1]; } @catch (OFException *e) { | | | 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | @throw [OFInvalidEncodingException newWithClass: c]; } @try { string = [self allocWithSize: length + 1]; } @catch (OFException *e) { [super free]; @throw e; } memcpy(string, str, length + 1); } return self; } |
︙ | ︙ |