xaf-memory-leaks

Identify memory leak sources in XAF applications and enforce disposal patterns.

6|2|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/kashiash/xaf-skills --skill xaf-memory-leaks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xaf-memory-leaks
Source: https://github.com/kashiash/xaf-skills/tree/main/xaf-memory-leaks
Command: npx skills add https://github.com/kashiash/xaf-skills --skill xaf-memory-leaks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps prevent memory leaks in DevExpress XAF applications by enforcing correct disposal patterns, event unsubscription, and lifecycle management across ObjectSpace, Session, and UI components.

Core Features & Use Cases

  • Enforces OnActivated/OnDeactivated/Dispose symmetry to avoid retained event handlers.
  • Demonstrates safe ObjectSpace disposal, batch processing, and lifecycle tracking patterns.
  • Provides guidance for diagnosing memory leaks with common anti-patterns and diagnostic tools.

Quick Start

Run a quick check to ensure every controller unsubscribes events in OnDeactivated and Dispose.

Frequently Asked Questions about xaf-memory-leaks

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

FAQPage Schema
How do I prevent memory leaks in XAF applications when disposing of ObjectSpace?

Memory leaks in XAF applications are prevented by enforcing safe ObjectSpace disposal patterns, proper lifecycle tracking during batch processing, and avoiding static references that retain objects.

Why does my XAF Controller cause a memory leak after deactivation?

XAF Controller memory leaks occur when event handlers are not properly unsubscribed. Enforcing OnActivated and OnDeactivated lifecycle symmetry ensures all subscribed events are detached during deactivation and Dispose.

What is the best way to handle WebForms session memory management in XAF?

Handling WebForms session memory management in XAF requires implementing robust disposal patterns and proper CollectionSource handling to prevent memory leaks across UI components.

How do I diagnose memory leaks in DevExpress XAF applications?

Diagnosing memory leaks in XAF applications involves integrating diagnostic tooling for memory profiling to identify common anti-patterns related to event handling, ObjectSpace disposal, and static references.

Can I use this approach for batch processing large datasets in XAF without leaking memory?

Yes, batch processing large datasets in XAF is supported by enforcing safe ObjectSpace disposal and lifecycle tracking patterns, preventing memory leaks when handling large volumes of data.