Performs a safe release operation on the given instance.
The equivalent code is:

if (instance != null) instance.Release();

C# | Visual Basic | Visual C++ |
public static void SafeRelease( this Id instance )
<ExtensionAttribute> _ Public Shared Sub SafeRelease ( _ instance As Id _ )
[ExtensionAttribute] public: static void SafeRelease( Id^ instance )

- instance (Id)
- The instance.

In Visual Basic and C#, you can call this method as an instance method on any object of type Id. When you use instance method syntax to call this method, omit the first parameter.

- Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)