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);