I have a few methods that return NSData objects, but the objects are created and manipulated as NSMutableData, and then copied to an immutable version along these lines:
        NSMutableData *myData = [NSMutableData data];
        :
        :
        return [NSData dataWithData:myData];

Would it be sufficient to cast, like this?
        :
        return (NSData *)myData;

Does this generalize to other non-collection classes, e.g., NSString?

TIA.

----
Karl Moskowski <[EMAIL PROTECTED]>
Voodoo Ergonomics Inc. <http://voodooergonomics.com/>

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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