• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: XCode not releasing nsstring
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >RE: XCode not releasing nsstring (From: Oliver Donald <email@hidden>)

  • Prev by Date: xcode weirdness - folder problem
  • Next by Date: Re: How to use color in panther's Font Panel ?
  • Previous by thread: RE: XCode not releasing nsstring
  • Next by thread: Darker background
  • Index(es):
    • Date
    • Thread