• 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: No Reference to Table Column
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: No Reference to Table Column


  • Subject: Re: No Reference to Table Column
  • From: j o a r <email@hidden>
  • Date: Thu, 6 Oct 2005 09:29:26 +0200


On 6 okt 2005, at 09.07, Philip Dow wrote:

Perhaps wrongly, I think of the column as an independent entity that shouldn't be deallocated just because it's been removed from a table. When I create a view, adding it to and removing it from another view retains and releases it, but the view is not deallocated thanks to my original alloc call. A parallel process would be the nibload allocating an instance of a column, adding it to the table view and then immediately removing it. It wouldn't be deallocated because there is still that original alloc. But I suppose it doesn't work this way. Maybe the nib loading also immediately releases the column?

Every object needs an owner. If it doesn't have an owner it should be deallocated. The table view is the owner of the columns, and if they are simply removed from the table view, they _should_ be deallocated.


Nib loading is documented as leaving all top level items in the nib file with a positive retain count. This is not against the rules of ObjC memory management, but something to consider when loading nib files outside of the scope of the convenience classes designed to do it for you (in particular NSWindowController).

That said, your table view columns are not top level objects in the nib file, and so are not really affected by any of that.

A workaround that you might attempt would be to avoid assigning the table view auto save name in the nib file, and assign it after you've made the necessary preparations - in this case assuring that you have retained references to the table columns.

j o a r



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: No Reference to Table Column
      • From: Corbin Dunn <email@hidden>
References: 
 >No Reference to Table Column (From: Philip Dow <email@hidden>)
 >Re: No Reference to Table Column (From: j o a r <email@hidden>)
 >Re: No Reference to Table Column (From: Philip Dow <email@hidden>)

  • Prev by Date: Re: No Reference to Table Column
  • Next by Date: Re: awakeFromNib not called
  • Previous by thread: Re: No Reference to Table Column
  • Next by thread: Re: No Reference to Table Column
  • Index(es):
    • Date
    • Thread