Re: newbie memory issues continued
Re: newbie memory issues continued
- Subject: Re: newbie memory issues continued
- From: Steve Christensen <email@hidden>
- Date: Sat, 19 Mar 2005 00:56:14 -0800
On Mar 18, 2005, at 11:50 PM, Daniel Child wrote:
I've tried to correct for obvious errors pointed out by Matt Neuberg
(thanks Matt!), but I am still having the same results: signal 11.
- (void)printKnownStrokes
{
int i;
StrokeDescription *sd;
NSMutableArray *theStrokes;
NSEnumerator *strokesEnum;
printf("number of strokes %i\n", [knownStrokes count]);
theStrokes = [self knownStrokes];
while ((sd = [strokesEnum nextObject]) != nil)
Well, one thing I notice is that strokesEnum hasn't been initialized.
{
[sd printStrokeDesc];
}
}
knownStrokes is an accessor for the knownStrokes array (a class member
variable).
Can you get into trouble if you have a class method and class variable
with the same name?
If the above seems like overkill it's because I am at wits end and am
trying everything I can think of. A more direct approach, of course,
is to simply print directly from knownStrokes, as in:
- (void)printKnownStrokes
{
int i;
StrokeDescription *sd;
for (i = 0; i < [knownStrokes count]; i++)
{
sd = [knownStrokes objectAtIndex: i];
[sd printStrokeDesc];
// Note: printStrokeDesc prints StrokeDescription objects.
}
}
but it doesn't make any difference. It still crashes. There's
something obvious here but I'm still not seeing it. Thanks in advance.
So you've already checked that all relevant variables are non-nil, etc.?
steve
_______________________________________________
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