[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GS Extensions and retain count problem
From: |
Manuel Guesdon |
Subject: |
GS Extensions and retain count problem |
Date: |
Fri, 28 Dec 2001 17:17:12 +0100 (CET) |
Hi,
I had some trouble with GC* objects and found that after +alloc -init, their
retain count seems strange.
I've attached a small program to test this.
doing a +new on the following objects set a retainCount of 1:
NSObject
NSArray
NSMutableDictionary
GCObject
But for the following, it set a retain count of 0:
GCMutableArray
GCArray
GCDictionary
I can't see any reason in the code.
If you run the test app, do you get the same result (with debug=yes) ?
If yes, is it 'normal' ?
Thank you.
Manuel
My results:
Dec 28 16:09:07 test[28944] No local time zone specified.
Dec 28 16:09:07 test[28944] Using time zone with absolute offset 0.
Dec 28 16:09:07 test[28944] test1 GCArray 0x8082a90 [RC=0]:()
Dec 28 16:09:07 test[28944] test2 NSObject 0x809d9f0 [RC=1]:<NSObject: 809d9f0>
Dec 28 16:09:07 test[28944] test3 NSArray 0x8099360 [RC=1]:()
Dec 28 16:09:07 test[28944] test4 GCDictionary 0x8095238 [RC=0]:{}
Dec 28 16:09:07 test[28944] test5 NSMutableString 0x80c78e0 [RC=1]:
Dec 28 16:09:07 test[28944] test6-a GCObject 0x80c4e40 [RC=1]
Dec 28 16:09:07 test[28944] test6-b GCObject 0x80c4e40 [RC=1]
Dec 28 16:09:07 test[28944] test6-c GCObject 0x80c6db8 [RC=1]
Dec 28 16:09:07 test[28944] test6-d GCObject 0x80c7870 [RC=1]
Dec 28 16:09:07 test[28944] test7-a GCMutableArray 0x80c4b68 [RC=0]
Dec 28 16:09:07 test[28944] test7-b GCMutableArray 0x80c4b68 [RC=0]
Dec 28 16:09:07 test[28944] test7-c GCMutableArray 0x80bec60 [RC=0]
Dec 28 16:09:07 test[28944] test7-d GCMutableArray 0x80ccbb8 [RC=0]
gsbug2.tgz
Description: application/compressed-tar
--
______________________________________________________________________
Manuel Guesdon - OXYMIUM <mguesdon@oxymium.net>
14 rue Jean-Baptiste Clement - 93200 Saint-Denis - France
Tel: +33 1 4940 0999 - Fax: +33 1 4940 0998
- GS Extensions and retain count problem,
Manuel Guesdon <=