Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COActually, the Object Allocations probe is what I used to determine that it's leaking half of the data. It points to the definition of the NSData object as the source of the extra memory. It absolutely HAS to be there too. If I comment out the two lines in my example, I have no memory activity whatsoever, whereas if I leave them as is, the memory slowly grows as the loop executes, and then drops down to the halfway point between where it started, and the peak value. It's quite strange.
      singulars
    2. COYou know that none of the data objects will be released until your autorelease pool drains, correct? You're going to get 36 copies of this data accumulated. Internally, -dataWithContentsOfURL may be allocating a separate copy of this data, which it may be actively releasing, so what you're seeing as 1/2 the NSData may be just 1 NSData when you temporarily have 2. Replace the autoreleased NSData with an explicit alloc/release and see if the problem doesn't go away.
      singulars
    3. COI commend you for your creative answer, but we found out what the problem was. Turns out, our app is caching half of every read for some reason (we never explicitly tell it to, but for some reason it's set up to do cache everything it can). Unfortunately, specifying the NSUnchachedRead flag for the options parameter of initWithContentsOfURL:options:error: has no effect. The only solution we've thought of thus far is to create a custom NSData class and simply overload initWithContentsOfURL, disabling any type of caching in the process.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload