Class TLeakReport
Unit
Declaration
type TLeakReport = class(TObject)
Description
<sumary> This class aims to interpret the memory leak trace file and produce a simpler report summarizing enough information to locate the problem at its source. )
Hierarchy
- TObject
- TLeakReport
Overview
Methods
constructor Create; |
|
destructor Destroy; override; |
|
class function New(ABuider: ICommandBuilder; const AProjectSource: string): TLeakReport; |
|
function AddItem(AItem: TLeakItem): TLeakItem; |
|
procedure CreateLeakItem(AContent: TStringList; AStart: Integer); |
|
function GetNextStringOf(const AText, AField: string): string; |
|
function AddRelativePath(const AFile: string): string; |
|
procedure Output; |
|
function ParseHeapTrace(const AContent: string): TLeakReport; |
Properties
property Executable: string read FExecutable write FExecutable; |
|
property ProjectSource: string read FProjectSource write FProjectSource; |
|
property LeakData: TArray<TLeakItem> read FLeakData write FLeakData; |
Description
Methods
constructor Create; |
|
Class constructor that initializes arrays and control variables. Check factory method new as the best option. |
destructor Destroy; override; |
|
The class's destructor frees all TLeakItem instances created during parse. |
class function New(ABuider: ICommandBuilder; const AProjectSource: string): TLeakReport; |
|
It is the best way to create a new instance of the class, as it considers its dependencies.
A valid instance of ICommandBuilder. Basically it will be used to generate the output to the console considering the theme settings.) The path to the source code, needed to find the files corresponding to the source code reported in the memory leak trace file. ) |
function AddItem(AItem: TLeakItem): TLeakItem; |
|
Adds a new memory leak item to the report. |
function ParseHeapTrace(const AContent: string): TLeakReport; |
|
Parses the contents of the trace file generated by the HeapTrace unit. Groups the information into a TLeakItem list.
Parameters
|
Properties
property Executable: string read FExecutable write FExecutable; |
|
Test project excutable name. |
property ProjectSource: string read FProjectSource write FProjectSource; |
|
Path to test project source files |
property LeakData: TArray<TLeakItem> read FLeakData write FLeakData; |
|
Array of TLeakItem that is generated after calling ParseHeapTrace method. |
Generated by PasDoc 0.16.0.