Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DXWIN0009: Orphan Components

In This Article

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

C#
MVVMContext mvvmContext1 = new MVVMContext();

#Valid Code

C#
MVVMContext mvvmContext1 = new MVVMContext(this.components);