Re: newbie memory issues continued
Re: newbie memory issues continued
- Subject: Re: newbie memory issues continued
- From: Shaun Wexler <email@hidden>
- Date: Sat, 19 Mar 2005 11:19:48 -0800
On Mar 18, 2005, at 11:50 PM, Daniel Child wrote:
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.
}
}
There's something obvious here but I'm still not seeing it.
- (void)printKnownStrokes
{
[knownStrokes makeObjectsPerformSelector:@selector(printStrokeDesc)];
}
--
Shaun Wexler
MacFOH
http://www.macfoh.com
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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