Skip to main content
A newer version of this page is available. .
All docs
V22.1

DXWIN0009: Orphan Components

Severity: Warning

All components that implement the IComponent interface must be added to the form’s private components collection (see the ‘Valid Code’ example). Otherwise, it may cause memory leaks.

To avoid this warning, use class constructors that accept parent containers (if such constructor methods exist).

Invalid Code

MVVMContext mvvmContext1 = new MVVMContext();

Valid Code

MVVMContext mvvmContext1 = new MVVMContext(this.components);