• 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: retain, copy, release, autorelease...leak
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: retain, copy, release, autorelease...leak


  • Subject: Re: retain, copy, release, autorelease...leak
  • From: email@hidden
  • Date: Thu, 28 Jun 2001 16:55:20 -0400

*correction*

forgive the second half of my last post, as I didn't think to read the ENTIRE message.

I can at least tell you why you're getting memory leaks: your colorStore = [self Quickly] method should be OUTside your for loop. You are creating 10000 functionally identical but different objects and adding each to the array. You should create one, and add it to the array 10000 times.

You are probably crashing because you shouldn't call release or autorelease on an already autoreleased object, since they get 'released' when your function returns.

-- Robert Lee Dotson

"Very funny, Scotty. Now beam up my clothes."


  • Prev by Date: Re: AppKit source available as reference?
  • Next by Date: Re: retain, copy, release, autorelease...leak
  • Previous by thread: Re: retain, copy, release, autorelease...leak
  • Next by thread: Re: retain, copy, release, autorelease...leak
  • Index(es):
    • Date
    • Thread