I wouldn't have though so.  I would assume that since I did not allocate them 
directly, I don't need to clean them up.  I've just inspected some code that 
declares properties that are marked as outlets and whose member variables are 
allocated in the NIB file.  When the class' dealloc method is called, it calls 
release for said properties.

I would assume this is bad form.  But I would like to know if I'm mistaken and 
if this is valid.

@interface ViewController : UIViewController
{
    MKMapView* mapView;
}
@property (nonatomic, retain) IBOutlet MKMapView* mapView;
@end

@implementation ViewController

@synthesize mapView;

- (void)dealloc
{
    [mapView release], mapView = nil;
    [super dealloc];
}
@end

-Michael

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to