//** Sample Datatypes **
int myInt = 30;
double myDouble = 3.14;
BOOL myBool = NO;
float myFloat = 1.123456f;
//************************ Creating NSNumber Objects *************************
//** If you`re creating NSNumber objects like this, they will be autoreleased even without ARC! **
NSNumber *myBoolNumberAutoreleased = [NSNumber numberWithBool:myBool];
NSNumber *myIntNumberAutoreleased = [NSNumber numberWithInt:myInt];
NSNumber *myDoubleNumberAutoreleased = [NSNumber numberWithDouble:myDouble];
NSNumber *myFloatNumberAutoreleased = [NSNumber numberWithFloat:myFloat];
NSLog(@"myBoolNumberAutoreleased: %@", myBoolNumberAutoreleased);
NSLog(@"myIntNumberAutoreleased: %@", myIntNumberAutoreleased);
NSLog(@"myDoubleNumberAutoreleased: %@", myDoubleNumberAutoreleased);
NSLog(@"myFloatNumberAutoreleased: %@", myFloatNumberAutoreleased);
2012-05-20 20:38:15.225 NSNumberSample[937:f803] myBoolNumberAutoreleased: 0
2012-05-20 20:38:15.228 NSNumberSample[937:f803] myIntNumberAutoreleased: 30
2012-05-20 20:38:15.228 NSNumberSample[937:f803] myDoubleNumberAutoreleased: 3.14
2012-05-20 20:38:15.229 NSNumberSample[937:f803] myFloatNumberAutoreleased: 1.123456