Re: Partially release NSMutableData

2010-08-05 Thread A.M.
imply retained in the array. Because the wire protocol identifies message element sizes, I was able to preallocate the data objects and copy from the kernel directly into the custom data objects to eliminate copying. In conclusion, there is no way to "partially release NSMutableData", bu

Re: Partially release NSMutableData

2010-08-05 Thread Graham Cox
On 04/08/2010, at 11:02 PM, Marcus Karlsson wrote: > 3. Use a single NSMutableData object. Once enough data has arrived move the > data that may have been appended later to the beginning and adjust the > capacity. > > Any opinions on which one to use or ideas on even better ones? This one's

Partially release NSMutableData

2010-08-05 Thread Marcus Karlsson
Hello. The subject of this thread is probably somewhat weird at first but let me explain. Let's say that I'm receiving data from the network and need to store it in a buffer. I need to store it until enough data has been collected, where what is considered "enough" is impossible to know befo