On Feb 17, 2014, at 2:08 , Clark Smith Cox III clark@apple.com wrote:
I didn't say take them out. I said why do they need to return an
autoreleased object.
Because they always have, and their semantics cannot be changed without
breaking decades worth of non-ARC code.
Sort of like
Thanks to Marcel, John McCall, and Clark Smith Cox III for addressing the
question I was trying to ask, apologies to others that the question was unclear.
So it seems that because ARC provides compatibility between ARC and non-ARC
code unlike how garbage collection worked with duplicated
need to put my own autorelease pool in place,
something I wouldn't have to think about if it wasn't an autoreleased object.
Documentation doesn't provide any information as to which methods return an
autoreleased object or not.
But since I can't call autorelease myself in ARC code if I have
I can't call autorelease myself in ARC code if I have a method
like.
KMImage *bigImage = [image kmImageByDoublingSize];
I'm not returning an autoreleased object so there is a difference in
behaviour between the behaviour of methods in apple frameworks and the ones
outside of those
On Feb 16, 2014, at 7:27 AM, Kevin Meaney k...@yvs.eu.com wrote:
Why do these methods need to return an autoreleased object, why can't they
behave the same as:
NSString *myString = [[NSString alloc] initWithFormat:@%@, @my String];
Is the only reason for interoperability with manual
On Feb 16, 2014, at 5:27 AM, Kevin Meaney k...@yvs.eu.com wrote:
Is the only reason for interoperability with manual retain-release code?
For backward compatibility. Nearly every piece of existing Cocoa code uses
these methods, so there's no way they could take them out.
It seems that it
On 16 Feb 2014, at 17:06, Jens Alfke j...@mooseyard.com wrote:
On Feb 16, 2014, at 5:27 AM, Kevin Meaney k...@yvs.eu.com wrote:
Is the only reason for interoperability with manual retain-release code?
For backward compatibility. Nearly every piece of existing Cocoa code uses
these
On Feb 16, 2014, at 10:22 AM, Kevin Meaney k...@yvs.eu.com wrote:
I didn't say take them out. I said why do they need to return an autoreleased
object. Why can't they just return an object like alloc init... does.
Because if they returned an object that wasn't autoreleased (i.e. that the
On Feb 16, 2014, at 10:22 AM, Kevin Meaney k...@yvs.eu.com wrote:
You're missing the question I was trying to ask. Why is autorelease needed at
all?
It's needed when a method creates an object [or otherwise gets an object with a
reference that needs to be released] and has to return that
And would be just like every other manual reference-counting scheme, with all
of the additional code they entail, and the higher liklihood of bugs, and so
on...
On Feb 16, 2014, at 2:13 PM, Jens Alfke j...@mooseyard.com wrote:
The only way to resolve this without autorelease would be to
On Feb 16, 2014, at 1:03 PM, Jens Alfke j...@mooseyard.com wrote:
On Feb 16, 2014, at 10:22 AM, Kevin Meaney k...@yvs.eu.com wrote:
I didn't say take them out. I said why do they need to return an
autoreleased object. Why can't they just return an object like alloc init...
does.
Because
On Feb 16, 2014, at 10:22, Kevin Meaney k...@yvs.eu.com wrote:
On 16 Feb 2014, at 17:06, Jens Alfke j...@mooseyard.com wrote:
On Feb 16, 2014, at 5:27 AM, Kevin Meaney k...@yvs.eu.com wrote:
Is the only reason for interoperability with manual retain-release code?
For backward
Without Arc, this:
NSString *s = [ [ NSString alloc ] initWithFormat: ...];
[ someCollection addObject: s ];
[ s release ];
is clearly more efficient (because not using autoreleasepools) than:
NSString *s = [ NSString stringWithFormat: ...];
[ someCollection addObject: s ];
But what about Arc?
On May 24, 2012, at 3:14 AM, Gerriet M. Denkmann wrote:
Without Arc, this:
NSString *s = [ [ NSString alloc ] initWithFormat: ...];
[ someCollection addObject: s ];
[ s release ];
is clearly more efficient (because not using autoreleasepools) than:
NSString *s = [ NSString
On May 24, 2012, at 1:14 AM, Gerriet M. Denkmann wrote:
Without Arc, this:
NSString *s = [ [ NSString alloc ] initWithFormat: ...];
[ someCollection addObject: s ];
[ s release ];
is clearly more efficient (because not using autoreleasepools) than:
NSString *s = [ NSString
15 matches
Mail list logo