ObjCRuntime.ReleaseAttribute Class
This attribute indicates that the return value of a function is retained (the caller obtains a reference to the object returned).

See Also: ReleaseAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.ReturnValue)]
public sealed class ReleaseAttribute : Attribute

Remarks

The Xamarin.iOS runtime uses this attribute to determine the reference counting behavior on the boundary between Objective-C and managed code.

C# Example

          class MyUrl : NSUrl { // NSUrl implements NSCopying
            public override NSObject Clone ()
            {
              return base.Clone ();
            }
          }
          

In this example Xamarin.iOS will first call 'release' on the object returned by [NSUrl clone] (the call to base.Clone), then call 'retain' as the object is returned to Objective-C.

Requirements

Namespace: ObjCRuntime
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0