Creates a value object containing the specified pointer.
On This Page
+ (NSValue *)valueWithPointer:(const void *)pointer;
The value for the new object.
A new value object that contains aPointer.
This method is equivalent to invoking value:withObjCType: in this manner:
NSValue *theValue = [NSValue value:&aPointer withObjCType:@encode(void *)];
This method does not copy the contents of aPointer, so you must not to free the memory at the pointer destination while the NSValue object exists. NSData objects may be more suited for arbitrary pointers than NSValue objects.
Creates a value object containing the specified object.
Returns the value as an untyped pointer.
The value as a non-retained pointer to an object.