newbie memory issues continued
newbie memory issues continued
- Subject: newbie memory issues continued
- From: Daniel Child <email@hidden>
- Date: Fri, 18 Mar 2005 21:50:49 -1000
Hi again,
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)
{
[sd printStrokeDesc];
}
}
knownStrokes is an accessor for the
knownStrokes array (a class member variable). 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.
Daniel
_______________________________________________
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