• 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: Andy Armstrong <email@hidden>
  • Date: Sat, 12 Feb 2005 17:52:51 +0000

On 12 Feb 2005, at 16:49, Coleman Nitroy wrote:
    for ( i = 0; i < [properties count] - 3; i++ ) {
	for ( j = 0; j < [properties count] - 2; j++ ) {
	    for ( k = 0; k < [properties count] - 1; k++ ) {

Does the value returned by [properties count] change during the execution of the loop? If not you might be better off not calling the method every time round the loop.


int l = [properties count];
for ( i = 0; i < l - 3; i++ ) {
}

--
Andy Armstrong, hexten.net

_______________________________________________
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: 
 >Memory leak. (From: Coleman Nitroy <email@hidden>)

  • Prev by Date: Re: Memory leak. DUH!
  • Next by Date: Re: A few questions about Memory Management
  • Previous by thread: Re: Memory leak.
  • Next by thread: Re: Memory leak.
  • Index(es):
    • Date
    • Thread