Is it okay to call +[NSData dataWithData:] with an NSMutableData object?

Viewed 10269

Is it a problem for me to do the following to change a mutable data instance immutable?

NSMutableData *mutData = [[NSMutableData alloc] init];
//Giving some value to mutData
NSData *immutableData = [NSData dataWithData:mutData];
[mutData release];
2 Answers
Related