Re: stringByAppendingBlahBlah woes
Re: stringByAppendingBlahBlah woes
- Subject: Re: stringByAppendingBlahBlah woes
- From: Laurent Daudelin <email@hidden>
- Date: Fri, 26 Sep 2003 10:00:14 -0400
on 26/09/03 04:43, Jirome Foucher at email@hidden wrote:
>
On vendredi, sep 26, 2003, at 10:31 Europe/Paris, j o a r wrote:
>
>
> The answer IS in the docs:
>
>
>
> <http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/
>
> Concepts/ObjectOwnership.html>
>
>
Damn ! Thanks
>
>
>
>
> "A body of code should never be concerned with releasing something it
>
> did not create. Therefore, Cocoa sets this policy: If you directly
>
> create an object (using alloc, allocWithZone:, or new) or copy an
>
> object (using copy, copyWithZone:, mutableCopy, or
>
> mutableCopyWithZone:), you are responsible for releasing it. If you
>
> did not directly create or copy the object, you do not own it and
>
> should not release it."
>
>
>
> Did you call alloc, new or copy to get the object? No you did not, and
>
> so should not release it. It's dead simple!
>
>
Roger ! Won't be asking stupid questions anymore...
>
As easy as CoreFoundations coding style, which I was used to.
There are no stupid questions. Only those you don't ask...
-Laurent.
--
============================================================================
Laurent Daudelin AIM/iChat: LaurentDaudelin <
http://nemesys.dyndns.org>
Logiciels Nemesys Software
mailto:email@hidden
fudge: 1. vt. To perform in an incomplete but marginally acceptable way,
particularly with respect to the writing of a program. "I didn't feel like
going through that pain and suffering, so I fudged it -- I'll fix it later."
2. n. The resulting code.
_______________________________________________
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.