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

Re: Memory leak.


  • Subject: Re: Memory leak.
  • From: Coleman Nitroy <email@hidden>
  • Date: Sat, 12 Feb 2005 12:37:35 -0500

On Feb 12, 2005, at 12:02 PM, Clark Cox wrote:

What is likely happening is that your code is allocating some objects
that are autoreleased. These objects won't go away until the current
autorelease pool is deallocated, which usually happens when your code
returns to the main event loop. You can probably fix this by using
your own, local, autorelease pool. Try something like:

The only objects in the code are the ones as parameters and the ints i,j,k.
So I tried adding an autorelease pool, and no matter where I place it, I get the same results. There literally is nothing in the middle of the for loops.


One thing to note, if I replace in the for loop statements [properties count] with just a number even a bigger one then [properties count] it runs fine, no memory problem. For example:

properties usually has no more then 6 objects so [properties count] = 6,
So if I change:

for ( i = 0; i < [properties count] - 3; i++ )

To:

for ( i = 0; i < 2000; i ++ )

The second runs light times faster still.

Do I have to do anything with properties? I've tried releasing and autoreleasing it. All i get is weird funky stuff if I release it. Like completely independant classes erroring about selectors not recognized and stuff in other parts of my code. Its freaky.

[OT] Does anyone have a way to setup Apple Mail so when I reply to something on this list it dosent send to the person who sent it to the list, rather it sends to the list.. I keep doing that grrr.

---
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. DUH!
      • From: Coleman Nitroy <email@hidden>
  • Prev by Date: Re: Memory leak.
  • Next by Date: Re: Memory leak. DUH!
  • Previous by thread: Re: Memory leak.
  • Next by thread: Re: Memory leak. DUH!
  • Index(es):
    • Date
    • Thread