Skip navigation.
 
mlShould I use a factory method here?
FROM : D.K. Johnston
DATE : Thu Jun 22 19:12:06 2006

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

Related mailsAuthorDate
mlShould I use a factory method here? D.K. Johnston Jun 22, 19:12
mlRe: Should I use a factory method here? Nir Soffer Jun 22, 21:10