• 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: Memory management in a thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >RE: Memory management in a thread (From: "Jonathan E. Jackel" <email@hidden>)

  • Prev by Date: Re: Brushed Metal: Embroidered text
  • Next by Date: Re: Leave NSLog()s in Final Product?
  • Previous by thread: Re: Memory management in a thread
  • Next by thread: Re: Memory management in a thread
  • Index(es):
    • Date
    • Thread