• 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
Memory leak.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Memory leak.


  • Subject: Memory leak.
  • From: Coleman Nitroy <email@hidden>
  • Date: Sat, 12 Feb 2005 11:49:02 -0500

I cannot figure out where this is leaking. I took out everything but just the for loop statements and the ints for counters. When I run this, I have a NSLog saying this code has completed execution. This loop gets called many times, anywhere from once to a few thousand times, and if I run it twice or something, no problem, but if I have it run many many times, it starts to slow down exponentially and with each pass memory usage goes up up up.


- (id) initWithPlanes: (NSArray *) planes withProperties: (NSArray *) properties
{
[super init];
int i, j, k;


    for ( i = 0; i < [properties count] - 3; i++ ) {
	for ( j = 0; j < [properties count] - 2; j++ ) {
	    for ( k = 0; k < [properties count] - 1; k++ ) {

		// some stuff that I have commented out.

	    }
	}
    }

    return self;
}


--- Coleman Nitroy email@hidden nitroy.com/cole

_______________________________________________
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


  • Follow-Ups:
    • Re: Memory leak.
      • From: Andy Armstrong <email@hidden>
    • Re: Memory leak.
      • From: Clark Cox <email@hidden>
  • Prev by Date: Re: NSImageView only for images?
  • Next by Date: Re: Memory leak.
  • Previous by thread: Re: NSImageView only for images?
  • Next by thread: Re: Memory leak.
  • Index(es):
    • Date
    • Thread