if I do this:
NSDate *dateStart;
[dateStart alloc];
// Initialise with a date somewhere here..
..
// Modify the start date.
dateStart = [chosenDate copy];
Should I be doing a [dateStart release] before assigning the dateStart pointer?
I’m from a C/C++ background and I don’t understand the whole ObjectiveC/iOS garbage collection behaviour (if indeed there is any). My C background is telling me I should be freeing the initial NSDate object that dateStart is pointing to. Would that be correct?
Yes since you allocated it before you should release it before this line
Also notice that its preferred that you do the allocation and initialization on the same line, dont break them to multiple lines
So this
Would change to