How do we clear out contents in NSMutableData
If you want an empty buffer:
[data setLength:0];
If you want to keep its size but set all the bytes to zero:
[data resetBytesInRange:NSMakeRange(0, [data length])];
If you want an empty buffer:
[data setLength:0];
If you want to keep its size but set all the bytes to zero:
[data resetBytesInRange:NSMakeRange(0, [data length])];