Re: No Reference to Table Column
Re: No Reference to Table Column
- Subject: Re: No Reference to Table Column
- From: Philip Dow <email@hidden>
- Date: Thu, 6 Oct 2005 09:07:59 +0200
On 05.10.2005, at 16:29, j o a r wrote:
Your problems is probably that the column is deallocated when it is
removed from the table.
If you remove the column from the table view, effectively taking
over ownership of the column from the table view, you need to
retain it.
What bothers me about this situation is that I never remove the
column from the table. If the column is in fact being removed, the
system is doing it.
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?
In any case, I'm going to try retaining the column in wakeFromNib and
see if that leaves me with a valid reference.
-Phil
_______________________________________________
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