• 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
Re: releasing an object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: releasing an object


  • Subject: Re: releasing an object
  • From: Andreas Mayer <email@hidden>
  • Date: Sat, 10 Oct 2009 18:18:24 +0200


Am 10.10.2009 um 17:43 Uhr schrieb Nick Rogers:

selectedPTVolume = [[Volume alloc] initWithDictionary:data];
[selectedPTVolume retain];

Read the memory management rules again. By calling alloc the retain count of the created object is one. There is no need to send it an additional retain message.


if I comment this the GUI hangs,

Then you've got another problem somewhere else.


	[selectedPTVolume release];
	selectedPTVolume = nil;
	if (outlineViewData)
		[outlineViewData reloadData];/ crashes here


I guess it crashes because you just pulled the outline view's model data from under it's feet.

How is the outline view connected to the model?


Andreas _______________________________________________

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


References: 
 >releasing an object (From: Nick Rogers <email@hidden>)
 >Re: releasing an object (From: Graham Cox <email@hidden>)
 >Re: releasing an object (From: Nick Rogers <email@hidden>)

  • Prev by Date: Re: using QLPreviewPanel and supporting 10.5
  • Next by Date: Re: releasing an object
  • Previous by thread: Re: releasing an object
  • Next by thread: Re: releasing an object
  • Index(es):
    • Date
    • Thread