Skip to content
GR32>TPlainInterfacedPersistentClass

TPlainInterfacedPersistent

Base class that provides lightweight IInterface implementation for TPersistent descendants with optional reference-counting.

Inheritance:TObject > TPersistent > TPlainInterfacedPersistent

Declaration

pascal
TPlainInterfacedPersistent = class(TPersistent, IInterface)

Description ​

TPlainInterfacedPersistent is a subclass of TPersistent that implements the IInterface interface. Unlike TInterfacedObject, instances of TPlainInterfacedPersistent are not reference-counted by default (RefCounted = False). This prevents unexpected destruction when casting to interface types or passing interface references.

Reference counting can be enabled per-instance by setting the protected RefCounted property to True.

Properties ​

NameTypeDescription
RefCountIntegerReturns the current reference count of the object instance.
RefCountedBooleanControls whether COM-style reference counting manages the instance lifetime.