Re: newbie memory question
Re: newbie memory question
- Subject: Re: newbie memory question
- From: Scott Stevenson <email@hidden>
- Date: Mon, 15 Nov 2004 20:48:57 -0800
On Nov 15, 2004, at 6:46 PM, Daniel Child wrote:
I wrote a simple app to count the letters in a textfield. In the code
below, I checked for retain counts. A couple of people have suggested
I use accessor methods to avoid memory leaks, but before I do so, I'd
like to understand where things are getting retained so I can
recognize such problems in the future. The console results were
surprising to me.
The value you get back from -retainCount is an unsigned int.
You're using %i in the format string, which is for signed integer. Try
changing it to %u and see what the results are.
- Scott
--
http://treehouseideas.com/
http://theobroma.treehouseideas.com/ [blog]
_______________________________________________
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