嗨,我是新手Objective-c
。请指导我如何释放实例变量和保留属性的内存。在这里,我想释放保留的财产。我们释放属性吗?
@interface VAViewController ()
@property(nonatomic, retain)NSMutableDictionary *starDict;
@end
@implementation VAViewController
@synthesize starDict = _starDict;
-(void)setDictName
{
[self.starDict setValue:@"maddt" forKey:@"dictName"];
}
-(void)dealloc
{
[_starDict release];
[super dealloc];
}
- (void)viewDidLoad
{
[super viewDidLoad];
_starDict = [[NSMutableDictionary alloc]init];
[self setDictName];
}
@end