Is release without prior retain dangerous?
Posted
by BankStrong
on Stack Overflow
See other posts from Stack Overflow
or by BankStrong
Published on 2010-04-13T15:34:13Z
Indexed on
2010/04/13
15:43 UTC
Read the original article
Hit count: 377
iphone
|objective-c
I have some code which I think has extra release statements.
- Is the code incorrect?
- What is the end result?
I don't understand memory management well yet - even after reading lots of articles and stackoverflow answers. Thanks for straightening me out.
NSMutableArray *points = [NSMutableArray new];
for (Segment *s in currentWorkout.segments) {
[points addObjectsFromArray:[s.track locationPoints]];
}
[routeMap update:points];
[points release];
© Stack Overflow or respective owner