Defines that no instances of the provided type should exist when this definition is asserted using MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).

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

Syntax

C#
public void NoInstances(
	Type type
)
Visual Basic
Public Sub NoInstances ( _
	type As Type _
)
Visual C++
public:
void NoInstances(
	Type^ type
)

Parameters

type
Type: System..::..Type
The Type of the instances that should be checked.

Remarks

Calling MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread) using this AssertionsDefinition will fail if an instance of the provided type exists, unless the type is also included in a call to an AllowXXX or MaxXXX method.

See Also