Differences From Artifact [9be4537608]:
- File
src/OFSet.m
— part of check-in
[1255f3a11a]
at
2012-08-10 20:08:24
on branch trunk
— Directly use the runtime's autorelease pools.
This greatly improves performance, as it gets rid of the overhead of
OFAutoreleasePool. (user: js, size: 8104) [annotate] [blame] [check-ins using]
To Artifact [ec5ebbb3c2]:
- File src/OFSet.m — part of check-in [fb515e8e24] at 2012-10-09 15:07:30 on branch trunk — Make use of instancetype. (user: js, size: 8174) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
113 114 115 116 117 118 119 | { if (self == [OFSet class]) return (id)&placeholder; return [super alloc]; } | | | | | | | | 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | { if (self == [OFSet class]) return (id)&placeholder; return [super alloc]; } + (instancetype)set { return [[[self alloc] init] autorelease]; } + (instancetype)setWithSet: (OFSet*)set { return [[[self alloc] initWithSet: set] autorelease]; } + (instancetype)setWithArray: (OFArray*)array { return [[[self alloc] initWithArray: array] autorelease]; } + (instancetype)setWithObjects: (id)firstObject, ... { id ret; va_list arguments; va_start(arguments, firstObject); ret = [[[self alloc] initWithObject: firstObject arguments: arguments] autorelease]; va_end(arguments); return ret; } + (instancetype)setWithObjects: (id const*)objects count: (size_t)count { return [[[self alloc] initWithObjects: objects count: count] autorelease]; } - init { |
︙ | ︙ |