• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: newbie memory issues continued
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >newbie memory issues continued (From: Daniel Child <email@hidden>)

  • Prev by Date: Re: Creating a large Cocoa project - tutorials?
  • Next by Date: Re: Help with CFXMLTreeCreateFromData with an NSMutableURLRequest response.
  • Previous by thread: Re: newbie memory issues continued
  • Next by thread: Help with CFXMLTreeCreateFromData with an NSMutableURLRequest response.
  • Index(es):
    • Date
    • Thread