Re: Can't keep from leaking memory
Re: Can't keep from leaking memory
- Subject: Re: Can't keep from leaking memory
- From: Lee Morgan <email@hidden>
- Date: Sat, 25 Jun 2005 20:18:42 -0400
Yes, of course. I'm sorry you must have missed one of my follow ups where I clarified that... return [[someData retain] autorelease]; Is actually... return [someData autorelease];
I had typed it in Mail instead of copy&pasting it.
- Lee
On Jun 25, 2005, at 7:11 PM, Tomasz Kukielka wrote: Don't retain the allocated someData. After allocation you have retain count of 1. Then you retain it and you have retain count 2. When autorelease does its job later it will decrease the retain count to 1 but the memory will not be freed. You need to go down to 0 to get the resources freed.
|
_______________________________________________
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