• 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 Leaks in CocoaEcho Sample
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory Leaks in CocoaEcho Sample


  • Subject: Re: Memory Leaks in CocoaEcho Sample
  • From: Marco Masser <email@hidden>
  • Date: Wed, 22 Oct 2008 21:54:28 +0200

P.S.: I just tested NSGradient's -getColor:location:atIndex: method (the only one I could find that returns an object by reference) and here too, the first parameter (an NSColor **) has a retain count of 1 and is not autoreleased.

How do you know that it isn't autoreleased?

I don't know of any way to look into an autorelease pool, if you mean that : )


I just made an NSColor ivar and retained it after calling - getColor:location:atIndex: and took a look on its retain count in a second method that was called after the NSAutoreleasePool had been drained (i.e. I took a look at the retain count after pressing a button). That way, all -autorelease messages must have been dealt with. In the second method, the count was 2. After removing the - retain following the -getColor..., the retain count in the second method was 1.

Marco
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Memory Leaks in CocoaEcho Sample
      • From: "Clark Cox" <email@hidden>
    • Re: Memory Leaks in CocoaEcho Sample
      • From: Nick Zitzmann <email@hidden>
    • Re: Memory Leaks in CocoaEcho Sample
      • From: Bill Bumgarner <email@hidden>
References: 
 >Memory Leaks in CocoaEcho Sample (From: Jens Beuckenhauer <email@hidden>)
 >Re: Memory Leaks in CocoaEcho Sample (From: Marco Masser <email@hidden>)
 >Re: Memory Leaks in CocoaEcho Sample (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: Memory Leaks in CocoaEcho Sample
  • Next by Date: Re: Memory Leaks in CocoaEcho Sample
  • Previous by thread: Re: Memory Leaks in CocoaEcho Sample
  • Next by thread: Re: Memory Leaks in CocoaEcho Sample
  • Index(es):
    • Date
    • Thread