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: Chris Gehlker <email@hidden>
- Date: Tue, 17 Jul 2001 06:23:57 -0700
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.
--
Cogito Ergo Spud. - I think therefore I yam.