Should I use a factory method here?
Should I use a factory method here?
- Subject: Should I use a factory method here?
- From: "D.K. Johnston" <email@hidden>
- Date: Thu, 22 Jun 2006 10:12:06 -0700
I have a text view in a window and a controller class that manages
it. There is a one-to-one correlation between these controllers and
their windows. The controller object is the delegate of the window,
and it's told to releases itself when the window closes.
My question is: Should I use a +init factory method to instantiate
the class, instead of the usual [[alloc] -init] procedure?
I _think_ the answer is "yes", since I should never send a release
message to any of these objects; but I'd feel better if I had an
expert second opinion.
dkj
_______________________________________________
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