@interface RadarAnnotation : NSObject <MKAnnotation> {
}
@property (retain, nonatomic) NSNumber *latitude;
@end
@implementation RadarAnnotation
@synthesize latitude;
- (CLLocationCoordinate2D)coordinate
{
coordinate.latitude = [self.latitude doubleValue];
return coordinate;
}
-(void) dealloc {
[super dealloc];
[latitude release];//error is here when mapViewController is popped off stack.
}
以下是我在mapViewController中实例化属性的方法:
poi.latitude = [NSNumber numberWithDouble:map.centerCoordinate.latitude];
我做错了什么?非常感谢。朱。
答案 0 :(得分:1)
你应该在dealloc方法的末尾调用[super dealloc]。