TRORemotable

Overview

The main purpose of the TRORemotable class is to be a base class for services that cannot be derived from the TRORemoteDataModule. It implements the IROObjectRetainer interface to keep references to required interfaced objects (normally, the TRORemoteDataModule does this with its data module nature). Since the objects registered to this class are interfaced objects, the registration and unregistration affects the reference counters of such objects thus preventing them from being disposed during the service lifetime.
Like the TRORemoteDataModule class, this class is not intended to be used directly, but serves as an ancestor for custom service classes.

Location


 

constructor Create  overload virtual

Creates a new instance.

constructor Create

constructor Create (TObject)  overload

Creates a new instance with a supplied value.

constructor Create(aOwner: TObject)

Parameters:

  • aOwner:

IsRetained  protected

Returns true if anObject is retained by Self.

function IsRetained(const anObject: TObject): Boolean

Parameters:

  • anObject: Object to check

NewInstance  override    (declared in TROInterfacedObject)

Creates and returns a new instance of the interfaced object, initializing its reference counter with 1.

class function NewInstance: TObject

RefCount    (declared in TROInterfacedObject)

Provides read-only access to the reference counter. When this value reaches zero, the object is freed.

property RefCount: Integer read

ReleaseObject  protected

Takes away the hold of anObject set by RetainObject.

procedure ReleaseObject(const anObject: TObject)

Parameters:

  • anObject: Object to release

RetainObject  protected

Sets the hold of anObject.

procedure RetainObject(const anObject: TObject)

Parameters:

  • anObject: Object to hold

 

RefCount    (declared in TROInterfacedObject)

Provides read-only access to the reference counter. When this value reaches zero, the object is freed.

property RefCount: Integer read

 

NewInstance  override    (declared in TROInterfacedObject)

Creates and returns a new instance of the interfaced object, initializing its reference counter with 1.

class function NewInstance: TObject

 

constructor Create  overload virtual

Creates a new instance.

constructor Create

constructor Create (TObject)  overload

Creates a new instance with a supplied value.

constructor Create(aOwner: TObject)

Parameters:

  • aOwner:

IsRetained  protected

Returns true if anObject is retained by Self.

function IsRetained(const anObject: TObject): Boolean

Parameters:

  • anObject: Object to check

ReleaseObject  protected

Takes away the hold of anObject set by RetainObject.

procedure ReleaseObject(const anObject: TObject)

Parameters:

  • anObject: Object to release

RetainObject  protected

Sets the hold of anObject.

procedure RetainObject(const anObject: TObject)

Parameters:

  • anObject: Object to hold