IROPooledClassFactory

Overview

The IROPooledClassFactory interface is designed to clear the pool of the TROPooledClassFactory instance.

The following example demonstrates the usage of this interface:

var
  list: IROStrings;
  i: integer;
  cf: IROClassFactory;
  pcf: IROPooledClassFactory;
begin
  list := GetClassFactoryNames;
  for i := 0 to list.Count -1 do begin
    cf := GetClassFactory(list[i]);
    if Supports(cf,IROPooledClassFactory, pcf) then pcf.ClearPool;
    pcf := nil;
    cf := nil; 
  end;   
  list := nil;

Location


 

ClearPool

Frees all objects in the pool.

procedure ClearPool

CreateInstance    (declared in IROClassFactory)

Creates an uninitialized object.

procedure CreateInstance(const aClientID: TGUID; out anInstance: IInterface)

Parameters:

  • aClientID: ClientID
  • anInstance: Instance

GetInvoker    (declared in IROClassFactory)

Returns the pointer to IROInvoker.

function GetInvoker: IROInvoker

InterfaceName    (declared in IROClassFactory)

Presents the interface name as string.

property InterfaceName: string read

Invoker    (declared in IROClassFactory)

Provides access to IROInvoker.

property Invoker: IROInvoker read

ReleaseInstance    (declared in IROClassFactory)

Releases a previously acquired instance.

procedure ReleaseInstance(const aClientID: TGUID; var anInstance: IInterface)

Parameters:

  • aClientID: ClientID
  • anInstance: Service instance

 

InterfaceName    (declared in IROClassFactory)

Presents the interface name as string.

property InterfaceName: string read

Invoker    (declared in IROClassFactory)

Provides access to IROInvoker.

property Invoker: IROInvoker read

 

ClearPool

Frees all objects in the pool.

procedure ClearPool

CreateInstance    (declared in IROClassFactory)

Creates an uninitialized object.

procedure CreateInstance(const aClientID: TGUID; out anInstance: IInterface)

Parameters:

  • aClientID: ClientID
  • anInstance: Instance

GetInvoker    (declared in IROClassFactory)

Returns the pointer to IROInvoker.

function GetInvoker: IROInvoker

ReleaseInstance    (declared in IROClassFactory)

Releases a previously acquired instance.

procedure ReleaseInstance(const aClientID: TGUID; var anInstance: IInterface)

Parameters:

  • aClientID: ClientID
  • anInstance: Service instance