- str
- C# String to wrap
Pointer to the NSString object, must be released with ReleaseNative.
This method creates an Objective-C NSString and returns an IntPtr that points to it. This does not create the managed NSString object that points to it, which is ideal for transient strings that must be passed to Objectiv-C as it is not necessary for Mono's Garbage collector or the MonoTouch/MonoMac engines to track this object.
The memory associated with this object should be released by calling the NSString.ReleaseNative(IntPtr) method.
c# Example
IntPtr objcString = NSString.CreateNative ("Hello");
// You can pass objcString to any methods that expect an Objective-C NSString pointer
NSString.ReleaseNative (objcString);