Indicates that instances of the specified types are allowed to exist after the target method has been executed.

Namespace:  SciTech.NetMemProfiler
Assembly:  MemProfiler2 (in MemProfiler2.dll)

Syntax

C#
[AttributeUsageAttribute(AttributeTargets.Method, AllowMultiple = true)]
public sealed class AllowInstancesAttribute : AssertionAttribute
Visual Basic
<AttributeUsageAttribute(AttributeTargets.Method, AllowMultiple := True)> _
Public NotInheritable Class AllowInstancesAttribute _
	Inherits AssertionAttribute
Visual C++
[AttributeUsageAttribute(AttributeTargets::Method, AllowMultiple = true)]
public ref class AllowInstancesAttribute sealed : public AssertionAttribute

Remarks

This attribute can be applied to methods to define that instances of the specified types are allowed to exist after the method has been executed. This will override instance restrictions applied using NoInstancesAttribute or NoNewInstancesAttribute. For more information see AssertionsDefinition.AllowInstances(array<Type>[]()[][], Boolean) and AssertionAttribute.

Inheritance Hierarchy

System..::..Object
  System..::..Attribute
    SciTech.NetMemProfiler..::..AssertionAttribute
      SciTech.NetMemProfiler..::..AllowInstancesAttribute

Thread Safety

Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.

See Also