[Biococoa-dev] NSMutableData vs malloc
Alexander Griekspoor
mek at mekentosj.com
Wed Jul 6 03:54:00 EDT 2005
Yes, I like this approach using NSMutableData, sounds nice!
Alex
On 6-jul-2005, at 0:36, Charles Parnot wrote:
>
>
> On Jul 5, 2005, at 10:43 AM, John Timmer wrote:
>
>
>
>>
>>
>>
>>
>>> So, ready to move on :-) ?
>>>
>>>
>>>
>>
>> If we are, it would seem to me that the next big step would be to
>> change the
>> internal representation of the sequences to a char array, and then
>> write the
>> bridging code to generate object representations on the fly. I
>> don't trust
>> my malloc capabilities enough to volunteer for the former, but
>> I'll happily
>> help on the latter.
>>
>>
>
> This is why I was leaning towards NSData. Actually, the real
> benefit is with NSMutableData. Mallocing an array of char like
> NSData would is trivial, but dealing with resizing is more
> difficult. NSMutableData does it for us and deals with memory
> issues. In addition, because it is a class cluster (sorry, the c
> word!), it might be (or will be) optimized for different sizes of
> data. Also, it is easy to write/read files, but also send data over
> the network... Finally, it is Core Data compatible. The bottom line
> is: if we malloc our own char[], we might end up creating NSData
> object anyway. Getting the pointer to the array of bytes is
> trivial: [myData bytes] or [myData mutableBytes].
>
> charles
>
> NB: sorry, John, I also sent you by mistake a half-baked version
> of that email!
>
> --
> Xgrid-at-Stanford
> Help science move fast forward:
> http://cmgm.stanford.edu/~cparnot/xgrid-stanford
>
> Charles Parnot
> charles.parnot at gmail.com
>
>
>
> _______________________________________________
> Biococoa-dev mailing list
> Biococoa-dev at bioinformatics.org
> https://bioinformatics.org/mailman/listinfo/biococoa-dev
>
>
*********************************************************
** Alexander Griekspoor **
*********************************************************
The Netherlands Cancer Institute
Department of Tumorbiology (H4)
Plesmanlaan 121, 1066 CX, Amsterdam
Tel: + 31 20 - 512 2023
Fax: + 31 20 - 512 2029
AIM: mekentosj at mac.com
E-mail: a.griekspoor at nki.nl
Web: http://www.mekentosj.com
iRNAi, do you?
http://www.mekentosj.com/irnai
*********************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.bioinformatics.org/pipermail/biococoa-dev/attachments/20050706/d48c6abd/attachment.html>
More information about the Biococoa-dev
mailing list