Differences From Artifact [0526f78e96]:
- File src/OFFile.m — part of check-in [7e5c81e186] at 2018-01-03 19:49:46 on branch trunk — Update copyright notice (user: js, size: 10920) [annotate] [blame] [check-ins using]
To Artifact [1cab20f522]:
- File
src/OFFile.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: 11009) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
310 311 312 313 314 315 316 | return self; } - (instancetype)initWithURL: (OFURL *)URL mode: (OFString *)mode { | < | < | < < > > > > > > > | 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | return self; } - (instancetype)initWithURL: (OFURL *)URL mode: (OFString *)mode { void *pool = objc_autoreleasePoolPush(); OFString *fileSystemRepresentation; @try { fileSystemRepresentation = [URL fileSystemRepresentation]; } @catch (id e) { [self release]; @throw e; } self = [self initWithPath: fileSystemRepresentation mode: mode]; objc_autoreleasePoolPop(pool); return self; } - (instancetype)initWithHandle: (of_file_handle_t)handle { self = [super init]; |
︙ | ︙ |