• 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: John Stiles <email@hidden>
  • Date: Wed, 9 Aug 2006 15:12:50 -0700

Without trying to be dismissive of the question, is there any reason why this 500K is a problem for your 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. By way of example, if you calloc a 1GB block of RAM on a 128MB machine, it doesn't immediately write out 1GB of data to virtual memory—it's only when you start touching the allocated pages that you see VM kick in.

So in other words, if there's no cookies being sent, and this memory isn't getting touched, it may not even be an issue.

(This is a simplification of the issue, to be fair—obviously no allocated object can be entirely free. Very cheap, perhaps, but nothing is free.)


On Aug 9, 2006, at 3:02 PM, Michael Tsai wrote:

I'm using NSURLConnection to fetch a URL over HTTP. When it does that, I see (in ObjectAlloc) that it instantiates the shared NSHTTPCookieStorage, which uses about 500K of RAM on my machine. Is there a way to prevent it from doing this, since I know I won't be needing the cookies? I've tried calling:

    [request setHTTPShouldHandleCookies:NO]

on the URL request, but that doesn't help.

--Michael

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


This email sent to email@hidden

_______________________________________________ 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: Michael Tsai <email@hidden>
References: 
 >NSURLConnection Without NSHTTPCookieStorage (From: Michael Tsai <email@hidden>)

  • Prev by Date: NSURLConnection Without NSHTTPCookieStorage
  • Next by Date: "Binding selectedObject cannot be bound to ..." while moving from Tiger to Panther
  • Previous by thread: NSURLConnection Without NSHTTPCookieStorage
  • Next by thread: Re: NSURLConnection Without NSHTTPCookieStorage
  • Index(es):
    • Date
    • Thread