ServicedComponent::CanBePooled Method ()

 

This method is called by the infrastructure before the object is put back into the pool. Override this method to vote on whether the object is put back into the pool.

Namespace:   System.EnterpriseServices
Assembly:  System.EnterpriseServices (in System.EnterpriseServices.dll)

public protected:
virtual bool CanBePooled()

Return Value

Type: System::Boolean

true if the serviced component can be pooled; otherwise, false.

The following code example demonstrates the use of this method.

// This object can be pooled.
virtual bool CanBePooled() override
{
   return (true);
}

.NET Framework
Available since 1.1
Return to top
Show: