developer-delphi-performance-and-memory

Analyze Delphi/FPC memory management and performance with FastMM and HeapTrc profiling.

Updated Jan 6, 2026
One-click install
npx skills add https://github.com/cslsoftwares/ParamentersORM --skill developer-delphi-performance-and-memory
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: developer-delphi-performance-and-memory
Source: https://github.com/cslsoftwares/ParamentersORM/tree/main/.cursor/skills/developer-delphi-performance-and-memory_V1.0.0
Command: npx skills add https://github.com/cslsoftwares/ParamentersORM --skill developer-delphi-performance-and-memory

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill covers investigation and correction of performance and memory management issues in Delphi/FPC projects: lifecycle of objects with try..finally, leak diagnostics with FastMM (Delphi) and HeapTrc/CMem (FPC), profiling before optimizing and revalidation after correction. It does not define functional domain, does not modify interface contracts, and does not alter business semantics— it only corrects resource lifecycles and identifies performance bottlenecks.

Core Features & Use Cases

  • Investigation of performance slowdowns, leaks, and resource overuse in Delphi/FPC modules.
  • Memory diagnostics with FastMM (Delphi) and HeapTrc/CMem (FPC), including profiling and validation after fixes.
  • Review and enforcement of proper object lifecycle using try..finally and disciplined Free/Dispose patterns across cross-compiler projects.

Quick Start

Execute a memory and performance audit on a Delphi/FPC project, implement proper object lifecycles with try..finally, and re-run profiling to confirm improvements.

Frequently Asked Questions about developer-delphi-performance-and-memory

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find memory leaks in Delphi and Free Pascal projects?

Memory leaks in Delphi and Free Pascal projects are diagnosed using FastMM for Delphi and HeapTrc or CMem for FPC, enabling leak detection and profiling to validate fixes after correcting resource lifecycles.

What's the best way to enforce proper object lifecycle management in Delphi cross-compiler workflows?

Proper object lifecycle management in Delphi cross-compiler workflows is enforced by applying try..finally patterns and disciplined Free or Dispose methods, ensuring resources are safely released across both Delphi and Free Pascal environments.

How do I profile Delphi performance before and after memory optimizations?

Delphi performance profiling requires measuring bottlenecks before optimizing, applying memory corrections, and re-running profiling to validate improvements, ensuring resource lifecycle changes do not alter business semantics.

Does FastMM work with Free Pascal heap tracing for cross-compiler memory diagnostics?

FastMM targets Delphi memory diagnostics, while HeapTrc and CMem handle Free Pascal heap tracing, supporting cross-compiler workflows by providing distinct leak detection and profiling validation for each compiler environment.

Why should I use try..finally patterns for resource lifecycle management in FPC?

Try..finally patterns are used in FPC resource lifecycle management to guarantee object disposal and prevent leaks, maintaining memory safety without modifying interface contracts or altering functional business semantics.

When should I not use this memory optimization approach for Delphi modules?

This memory optimization approach should not be used when modifying interface contracts, defining functional domains, or altering business semantics, as it strictly corrects resource lifecycles and identifies performance bottlenecks.