Quick response:
When you install:
url = [[coder decodeObjectForKey:@"url"] retain];
you are not using @property. You manually set the value of an instance variable url. Therefore, you must also manually specify a value retain.
To set a variable using synthesized properties, you must call:
[self setUrl:[coder decodeObjectForKey:@"url"]];
or
self.url = [coder decodeObjectForKey:@"url"];
retain.
:
Objective-C @property @synthesize getter setter:
@interface MyClass
{
id someValue;
}
@property (retain) id someValue;
@end
@implementation MyClass
@synthesize someValue;
@end
:
@interface MyClass
{
id someValue;
}
- (id)someValue;
- (void)setSomeValue:(id)newValue;
@end
@implementation MyClass
- (id)someValue { return someValue; }
- (void)setSomeValue:(id)newValue
{
[newValue retain];
[someValue release];
someValue = newValue;
}
@end
"" - . - , .