[Overview][Classes][Procedures and functions][Index] Reference for unit 'LazClasses' (#lazutils)

TRefCountedObject

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Implements a thread-safe reference-counted class which performs free notifications.

Declaration

Source position: lazclasses.pas line 48

type TRefCountedObject = class(TFreeNotifyingObject)

protected

  procedure DoFree; virtual;

  

Performs actions needed to free the reference counted object instance.

  procedure DoReferenceAdded; virtual;

  

Has an empty implementation in TRefCountedObject.

  procedure DoReferenceReleased; virtual;

  

Has an empty implementation in TRefCountedObject.

  property RefCount: Integer; [r]

  

Number of times the object instance has been referenced in the application.

public

  constructor Create;

  

Constructor for the class instance.

  destructor Destroy; override;

  

Destructor for the class instance.

  procedure AddReference;

  

Increments the value in RefCount and calls DoReferenceAdded.

  procedure ReleaseReference;

  

Decrements the value in RefCount and calls DoReferenceReleased.

end;

Inheritance

TRefCountedObject

  

Implements a thread-safe reference-counted class which performs free notifications.

|

TFreeNotifyingObject

  

Base class used to implement objects which perform free notifications.

|

TObject

Description

Used in the implementation of logging classes and the debugger interface in Lazarus. Also used in the implementation of classes for TSynEdit.


Version 4.0 Generated 2025-05-03 Home