• 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
memory advice for still learning coder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

memory advice for still learning coder


  • Subject: memory advice for still learning coder
  • From: "Rick C." <email@hidden>
  • Date: Sat, 3 Oct 2009 00:38:02 -0700 (PDT)

hello,

i'm having a few memory issues where my memory climbs over time although using leaks it shows i have no leaks.  i have gone over my code many times making sure i release items that need it and have gone over the docs looking for something i might be missing.  i'm thinking my problem might be in these 2 design areas and if anyone could give some input that would be great:

1.  i have a handful of mutable arrays that i need for the lifetime of my app.  i alloc/init them upon startup and at various places i do removeAllObjects and then addObjectFromArray with the other array being convenience created.  in dealloc i do release.

2.  i use NSObject performSelectorInBackground for a few methods so they do not tie up my main thread.  one of these background methods uses NSTask.  in every background method i init the autorelease pool and release it according to the docs.  i also release the NSTask i use.  and i do modify a few of the above mentioned mutable arrays in these background methods in the way i described above.

i know i'm not including code here so i hope this is not too vague.  but i was thinking someone might be able to tell me if i'm on the wrong track here.  i'm trying to pinpoint where the problem can be and it seems everytime i initiate performSelectorInBackground my memory usage goes up and is not reclaimed.  i know starting a new thread increases memory but i'm expected it to be reclaimed.  to be honest i don't need to use so many threads just one would do, but i used performSelectorInBackground to make things a bit more simple.  i can provide more info if needed.  thank you very much,

rick



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: memory advice for still learning coder
      • From: Ken Thomases <email@hidden>
  • Prev by Date: NSValueTransformer Loop
  • Next by Date: releasing a object containing others in a array
  • Previous by thread: NSValueTransformer Loop
  • Next by thread: Re: memory advice for still learning coder
  • Index(es):
    • Date
    • Thread