Re: dealloc and Instances created from IB
Re: dealloc and Instances created from IB
- Subject: Re: dealloc and Instances created from IB
- From: mmalcolm crawford <email@hidden>
- Date: Wed, 13 Mar 2002 13:23:35 -0800
On Wednesday, March 13, 2002, at 11:43 AM, Matt Thomas wrote:
I created a class in Interface Builder, instantiated it, made the
proper connections, and then created the files. I then edited the class
and added init and dealloc methods in the class. I was then debugging
the class and it looks like dealloc was not being called.
When are you expecting it to be called, and why?
So my questions is, if i have an instance of a class created in
Interface Builder, will it's dealloc method ever be called? Is there a
method I can use to make sure clean up goes okay when I release an
object?
Probably the easiest approach is to ensure your NIB controller is
subclassed from NSWindowControler -- it should ensure that all of the
objects in the UI get released properly (see
http://developer.apple.com/techpubs/macosx/Cocoa/TasksAndConcepts/ProgrammingTopics/
MemoryMgmt/index.html
)
mmalc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.