May I add two questions to this enlightening thread?
1. With ARC, do we still have to worry about string1 leaking in the following
scenario?
@property (nonatomic, copy) NSString *string1;
…..
self.string1 = @Hello;
string1 = @Hello hello;
string1 = @Hello hello hello;
2. How do the strong,
On Wednesday, 29. May 2013 at 8:37, Diederik Meijer | Ten Horses wrote:
May I add two questions to this enlightening thread?
1. With ARC, do we still have to worry about string1 leaking in the following
scenario?
@property (nonatomic, copy) NSString *string1;
…..
No, ARC perfectly
On May 28, 2013, at 23:37 , Diederik Meijer | Ten Horses
diede...@tenhorses.com wrote:
1. With ARC, do we still have to worry about string1 leaking in the following
scenario?
@property (nonatomic, copy) NSString *string1;
…..
self.string1 = @Hello;
string1 = @Hello hello;
string1 =
Thanks Robert and Quincey, that's very helpful!
Op May 29, 2013, om 8:26 AM heeft Quincey Morris
quinceymor...@rivergatesoftware.com het volgende geschreven:
On May 28, 2013, at 23:37 , Diederik Meijer | Ten Horses
diede...@tenhorses.com wrote:
1. With ARC, do we still have to worry
Though it's clearly defined in the docs when to use NSMubleAnything vs.
NSAnything (insert Array, Dictionary, String, etc for Anything), there is no
compiler warning when you perform a simple action such as allocate a string and
then reassign values to it.
With this in mind, what exactly
On 28 May, 2013, at 9:39 PM, Alex Zavatone z...@mac.com wrote:
Though it's clearly defined in the docs when to use NSMubleAnything vs.
NSAnything (insert Array, Dictionary, String, etc for Anything), there is no
compiler warning when you perform a simple action such as allocate a string
On May 28, 2013, at 9:50 AM, Roland King wrote:
On 28 May, 2013, at 9:39 PM, Alex Zavatone z...@mac.com wrote:
Though it's clearly defined in the docs when to use NSMubleAnything vs.
NSAnything (insert Array, Dictionary, String, etc for Anything), there is no
compiler warning when you
On May 28, 2013, at 08:39:21, Alex Zavatone z...@mac.com wrote:
Though it's clearly defined in the docs when to use NSMubleAnything vs.
NSAnything (insert Array, Dictionary, String, etc for Anything), there is no
compiler warning when you perform a simple action such as allocate a string
On May 28, 2013, at 9:46 AM, Steve Mills wrote:
On May 28, 2013, at 08:39:21, Alex Zavatone z...@mac.com wrote:
Though it's clearly defined in the docs when to use NSMubleAnything vs.
NSAnything (insert Array, Dictionary, String, etc for Anything), there is no
compiler warning when you
Alex,
What your three lines of code do:
NSString *myString;
Compiler allocates space for a pointer on the run time stack.
myString = @Hi;
Compiler creates an NSString object somewhere in the heap with the value @Hi
and points the pointer to it.
myString = @Hi there;
Compiler creates
Alex,
Forget what I said about memory management. It is wrong.
Your confusion probably stems from the fact that the pointer named myString is
allowed to point to any number of string during the execution of your program.
It is the objects that are immutable, not the pointers to them.
Tom
On May 28, 2013, at 7:44 AM, Alex Zavatone wrote:
On May 28, 2013, at 9:46 AM, Steve Mills wrote:
On May 28, 2013, at 08:39:21, Alex Zavatone z...@mac.com wrote:
Though it's clearly defined in the docs when to use NSMubleAnything vs.
NSAnything (insert Array, Dictionary, String, etc
On May 28, 2013, at 6:39 AM, Alex Zavatone z...@mac.com wrote:
NSString *myString;
You’ve declared myString as a _mutable_ pointer to an _immutable_ object. If
you had declared it as
NSString* const myString = @“Hi;
then the variable itself would be immutable, and the compiler would
13 matches
Mail list logo