In article <wcyeo-C80CCE.10593025052008@[EMAIL PROTECTED]
>,
William Yeo <wcyeo@[EMAIL PROTECTED]
> wrote:
> In article <h6KdnQGxnMLUPaTVnZ2dnUVZ_gWdnZ2d@[EMAIL PROTECTED]
>,
> Don Bruder <dakidd@[EMAIL PROTECTED]
> wrote:
>
> > But now, I'm thinking I've got it nailed down, and it can be summed up
> > as follows:
> >
> > "The "init" that runs when "X=[[... alloc] init]" is done is the init
of
> > object "X", "X" being an object of class "...", where "..." is
whatever
> > class is being worked with for a given occurrence of such a construct.
>
> Let's be VERY precise here (pedantic, even) and say that the allocator
> and initializer run are "..."s, not X's.
When it comes to this sort of thing, pedantic is good, as far as I'm
concerned...
>
> That is DBWhatever *x = [[DBWidget alloc] init];
>
> produces an DBWidget instance not a DBWhatever instance.
Right - That's what I meant, even if I didn't say it the same way - x is
going to be holding a "whatever-it-was-that-preceded-the-alloc", not a
"whatever-it-was-that-preceded-the-*x". Which implies that the init
that'll be run is the one belonging to whatever that was, since x is one
of those, and not a whatever-preceded-the-*x.
> That's gotta be
> a bad idea no matter what DBWhatever is. The fact that the result is
> assigned to a DBWhatever* is almost certainly going to cause grief
later.
I can see that being the case.
In fact, I think I've likely been seeing trial code blow up in my face
for exactly that reason.
<sigh>
Beat on me long enough, and EVENTUALLY it sinks in.
Thanks, guys. My bruises ain't gonna thank you, but I do.
Now, about "retain"/"release"/"autorelease" - How does that... <looks up
and notices a trail of dust disappearing over the nearest hilltop>
Uh...
Guys?
Hello?
Hey? Where did everybody go? Dey weft me awwwwl awone...
:)
--
Don Bruder - dakidd@[EMAIL PROTECTED]
- If your "From:" address isn't on my
whitelist,
or the subject of the message doesn't contain the exact text
"PopperAndShadow"
somewhere, any message sent to this address will go in the garbage without
my
ever knowing it arrived. Sorry... <http://www.sonic.net/~dakidd>
for more
info


|