Tagged pointers.

In 64 Bit cocoa for small value like objects for NSNumber, NSValue, NSDate etc the object is stored in the pointer itself. In addressing modes the 4 least significant bits are unused for pointers to NSObjects. The least significant bit is used as a flag to indicate whether the pointer is tagged or not. If tagged the data is actually stored in the pointer. This is three times more space efficient and 100 times faster to allocate and destroy.

Garbage collection was deprecated in 10.8. Xcode 5 is a ARC application and no longer a GC application.

Implicit bridging

Xcode 5 has added implicit bridging for Core Foundation objects. For CoreFoundation functions that obey the conventions of using the Create/Copy/Get words used in camel case in function names no longer need the bridging casts.

The @encode compiler directive.

NSValue is a container for C and Objective-C data items. It can hold any C type, from simple types like int, float, char etc to pointers, structures and objective-c object ids. NSValue not only wraps the item into an Objective-C object but also encodes the type information of the original object.

To create an NSValue object, you pass a pointer to the item along with the encoded type information generated by @encode.

NSPoint aPoint = NSMakePoint(100.0, 200.0);
NSValue *pointValue = [NSValue valueWithBytes:&aPoint objCType:encode(NSPoint)];

The compiler directive @encode returns a const char * string that encodes the object type.

You can request from NSValue what the object type is that it contains and then you can use this to obtain the object data. See:

if (strcmp([pointValue objCType], @encode(NSPoint)) == 0) // equal
{
  NSPoint thePoint;
  [pointValue getValue:&thePoint];
  [self setThePoint:thePoint];
}