"Objects in the nib file are created with a retain count of 1 and then autoreleased... If you define outlets for nib-file objects, you should always define a setter method (or declared property) for accessing that outlet. Setter methods for outlets should retain their values."
And indeed, if I load a nib and don't retain its top-level objects (usually thru outlets backed by a setter with a retain policy), they vanish in a puff of smoke. So far, so good. But what about the app delegate? In a typical iPhone app (e.g. the template), the app delegate is instantiated through the MainWindow nib loading. It is a top-level nib object. So it should be autoreleased. Yet the UIApplication object does NOT retain its delegate. So why doesn't the app delegate vanish in a puff of smoke? Is the MainWindow nib subject to different memory management rules? Thx - m. -- matt neuburg, phd = [email protected], <http://www.tidbits.com/matt/> A fool + a tool + an autorelease pool = cool! AppleScript: the Definitive Guide - Second Edition! http://www.tidbits.com/matt/default.html#applescriptthings _______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
