Re: trivial question
Re: trivial question
- Subject: Re: trivial question
- From: Jeff Harrell <email@hidden>
- Date: Fri, 20 Jun 2003 14:48:59 -0500
The answer from memory is yes, but the easy way to check is to either
(1) insert an NSLog line that prints [yourobject retainCount] at some
point in your program, or (2) stop your program with the debugger and
type "p [yourobject retainCount]" in the gdb console.
retainCount is an NSObject method. Any NSObject subclass (and all
classes should be NSObject subclasses) can respond to retainCount. It
returns an int.
On Thursday, June 19, 2003, at 07:36 PM, Nick Hristov wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
- -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello.
When I send a messages to NSDictionary, allKeys and allValues, do I
get an autoreleased object, with ref. count. 1 (i.e. it is not a
temporary object)?
That is the proper and expected Cocoa memory handling procedure...
Nick
- -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (Darwin)
iD8DBQE+8lcgCyzRmbRPFlQRAtUaAJ9o0T+QjtNQyL9spy6Ex86ty80odACgqauB
ZdJjU5NrF7IeMYzir4qQ8e0=
=tYDp
- -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (Darwin)
iD8DBQE+8lcsCyzRmbRPFlQRAg+9AJ47nHUIYm9HrN8UzuHDlYJWiAej2QCcDbcx
AJ0sPP2Yjmlj/ql1Hjvdt9g=
=XKRB
-----END PGP SIGNATURE-----
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
--
email@hidden
http://homepage.mac.com/jharrell
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.