if the chunks you wan to cut off are big enough you could potentially allocate a new object there which get's gc-ed.
But I have no clue how to do that without VM / NB support ;) On 2012-11-07, at 14:39, Mariano Martinez Peck <[email protected]> wrote: > Hi guys. I have a ByteArray of size N. > And I want now only the same ByteArray but from 1 to N-X. I am using > #copyFrom:to: but that one answers a new copy. If the ByteArray is large, > this takes time because it needs to allocate a large object. In my case I > don't care and I can modify the original ByteArray itself (lets say make it > smaller, null the remaining part and change the object header info). That > way I would avoid an extra allocation. Is there a primitive for that? > > Thanks! > > -- > Mariano > http://marianopeck.wordpress.com
