Re: XCode not releasing nsstring
Re: XCode not releasing nsstring
- Subject: Re: XCode not releasing nsstring
- From: Clark Cox <email@hidden>
- Date: Wed, 12 Nov 2003 09:07:59 -0500
>
As the other people said, [x release] does not change the address that
>
"x"
>
There is an idea... I am not sure about filing an enhancement request
>
on it,
>
since I am not quite sure whether it would be good or bad, but if some
>
basic
>
object (NSObject, or even "lower") would take care of automatically
>
changing
>
its pointer numeric value when de-allocated, it would have saved some
>
people
>
some hair.
That isn't possible. There is no way that such a method could "reach
outside" it's scope, and change the value of a variable that is
pointing to it (without searching through all memory for it's pointer
value). That would be like expecting the following code to print "2"
void foo(int i)
{
i = 2;
}
int main()
{
int i = 4;
foo(i);
printf("%d\n", i);
}
--
Clark S. Cox III
email@hidden
http://homepage.mac.com/clarkcox3/blog/B1196589870/index.html
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.