• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
End Of Method Releasing Order?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

End Of Method Releasing Order?


  • Subject: End Of Method Releasing Order?
  • From: Chunk 1978 <email@hidden>
  • Date: Mon, 1 Jun 2009 20:46:27 -0400

does it matter which order objects are released at the end of a
method?  example:

-=-=-=-=-

- (void)applicationWillTerminate:(NSNotification *)notification
	{
	FourLines *fourLines = [[FourLines alloc] init];
	fourLines.field1 = field1.text;
	fourLines.field2 = field2.text;
	fourLines.field3 = field3.text;
	fourLines.field4 = field4.text;

	NSMutableData *data = [[NSMutableData alloc] init];
	NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc]
initForWritingWithMutableData:data];
	[archiver encodeObject:fourLines forKey:kDataKey];
	[archiver finishEncoding];
	[data writeToFile:[self dataFilePath] atomically:YES];

	[archiver release];
	[data release];
	[fourLines release];
	}

-=-=-=-=-

at the end i'm finished with archiver, data and fourLines, but does it
matter in this case which one i release first?
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: End Of Method Releasing Order?
      • From: Wade Tregaskis <email@hidden>
    • Re: End Of Method Releasing Order?
      • From: WT <email@hidden>
  • Prev by Date: Thin navigation & tool bars in landscape
  • Next by Date: Re: Several Questions
  • Previous by thread: Thin navigation & tool bars in landscape
  • Next by thread: Re: End Of Method Releasing Order?
  • Index(es):
    • Date
    • Thread