• 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: NSURLConnection Without NSHTTPCookieStorage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSURLConnection Without NSHTTPCookieStorage


  • Subject: Re: NSURLConnection Without NSHTTPCookieStorage
  • From: Michael Tsai <email@hidden>
  • Date: Wed, 9 Aug 2006 20:59:14 -0400

On Aug 9, 2006, at 6:12 PM, John Stiles wrote:

Without trying to be dismissive of the question, is there any reason why this 500K is a problem for your app?

Well, this code will run in some small apps--essentially helpers that will be open all the time. It seems like a shame to waste that RAM. Also, it wouldn't surprise me if other people have a lot more cookies than I do, so that more than 500K is used per app.


FWIW, it's entirely possible that very little of that space actually consumes any real RAM; calloc'ing a 500K block typically shouldn't force any existing pages out of RAM until someone actually accesses the space.

Actually, it's not allocating a big block, but rather 7,000 NSHTTPCookie objects and 7,000 NSHTTPCookieInternal ones. So I think it's using real RAM.


I'm embarrassed to say that when I ran ObjectAlloc again, no memory was used for cookies. I guess turning them off *did* work, and somehow that change (which was in a framework) didn't get recompiled into the app before I did my test (unless there's some other factor I'm not aware of). So perhaps the lesson here is that it's well worth using -setHTTPShouldHandleCookies:.

--Michael

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSURLConnection Without NSHTTPCookieStorage
      • From: John Stiles <email@hidden>
References: 
 >NSURLConnection Without NSHTTPCookieStorage (From: Michael Tsai <email@hidden>)
 >Re: NSURLConnection Without NSHTTPCookieStorage (From: John Stiles <email@hidden>)

  • Prev by Date: Re: Core Data: Forcing update of NSTableView bound to an NSArrayController
  • Next by Date: Re: NSURLConnection Without NSHTTPCookieStorage
  • Previous by thread: Re: NSURLConnection Without NSHTTPCookieStorage
  • Next by thread: Re: NSURLConnection Without NSHTTPCookieStorage
  • Index(es):
    • Date
    • Thread