Re: Collection of Cocoa & objc questions from a "newbie"
Re: Collection of Cocoa & objc questions from a "newbie"
- Subject: Re: Collection of Cocoa & objc questions from a "newbie"
- From: "David P. Henderson" <email@hidden>
- Date: Tue, 17 Jul 2001 09:35:34 -0400
On Tuesday, July 17, 2001, at 09:23 , Chris Gehlker wrote:
>
On 7/16/01 9:35 PM, "tyler" <email@hidden> wrote:
>
>
> Perhaps it would be useful for other more advanced people to take a
>
> look
>
> at because it implies the potential for a memory leak (and all kinds of
>
> other problems like not closing connections to things like databases or
>
> whatever if such closing was done in the dealloc method of a
>
> view/window
>
> etc).
>
>
The real question here is: "What sins are forgiven at exit?" Classic MOS
>
would close all open file connections and return all memory to the OS at
>
exit. So does Windows and, I suspect, all *nixen.
>
>
By default, CodeWarrior sets up malloc() pools when a program is
>
launched
>
and never bothers to free() them when the program exits. Maybe the ObjC
>
runtime is doing the same thing.
>
Over simplification, when your process requests memory, it does so from
the kernal, and when your process exits, what the kernal giveth the
kernal taketh.
Dave
--
Chaos Assembly Werks
"Nothing is too good to be true, except, perhaps, the morality of a
bishop."
- Israel Zangwill