ios - Can I change (unsigned) to (NSUInteger) or will it create problems? -
i jr software developer, can change (unsigned) (nsuinteger) or create problems later?
- (unsigned)retaincount { return uint_max; //denotes object cannot released }
warning said
mkstoremanager.m:88:1: conflicting return type in implementation of 'retaincount': 'nsuinteger' (aka 'unsigned long') vs 'unsigned int'
i found previous definition
- (nsuinteger)retaincount objc_arc_unavailable;
your method must return nsuinteger
because how retaincount
method defined in nsobject
.
the error being caused value trying return. instead of returning uint_max
, should return nsuintegermax
.
the underlying type nsuinteger
changes depending on whether building 32 or 64 bit. accordingly, value of nsuintegermax
changes match type.
- (nsuinteger)retaincount { return nsuintegermax; //denotes object cannot released }
Comments
Post a Comment