MonobjcMonobjc Documented Class Library
SafeRelease Method (instance)

Performs a safe release operation on the given instance.

The equivalent code is:

if (instance != null) instance.Release();
Declaration Syntax
C#Visual BasicVisual C++
public static void SafeRelease(
	this Id instance
<ExtensionAttribute> _
Public Shared Sub SafeRelease ( _
	instance As Id _
static void SafeRelease(
	Id^ instance
instance (Id)
The instance.
Usage Note
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.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc (Module: Monobjc)