On Oct 9, 2011, at 05:44 , [email protected] wrote:

> But what I tried to achieve was to do it somewhat more "OO", although sharing 
> the payload between various instances seems to be contradicting it ;-) 

Not at all. Sharing the payload is neither a problem nor wrong, but trying to 
take a shortcut by using NSMutableData to do it isn't the solution.

Don't be afraid of writing your own class for this. You need to encapsulate the 
underlying NSMutableData object, a starting offset and a byte length, and you 
need to be able to retrieve a pointer (maybe a structure pointer rather than a 
void*) to the corresponding mutable data fragment. Sounds pretty 
straightforward.


_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to