Re: Memory management in a thread
Re: Memory management in a thread
- Subject: Re: Memory management in a thread
- From: Allan Odgaard <email@hidden>
- Date: Fri, 12 Mar 2004 21:40:57 +0100
On 12. Mar 2004, at 21:02, Jonathan E. Jackel wrote:
First, there's no rule that says you have to use autoreleased objects.
You
can retain objects and release them immediately when you are done.
I think he was using class methods to allocate objects, so the auto
releasing is done there and not in his code.
Fourth, until you've profiled your code, you don't know whether this is
really a problem. Virtual memory makes it very difficult to run out of
memory. The practical issue is whether there's a noticeable
performance
hit.
Well, it might be transparent to the programmer, but I can certainly
feel it each time the OS hits the swap-file ;) even after such an
incident, all what can be swapped to disk will have been swapped to
disk, so each time I turn to a new app/window/graphics, it will need to
do some loading (although it was previously in memory).
I think when we are dealing with parameters defined at run-time (as the
size of the project, number of projects etc.), one should not pile up
resources when it can be avoided. Although not very relevant in this
domain, but this also excludes one obvious method of DoS attacks.
_______________________________________________
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.