π₯οΈ C# WinForms + DTO (with COM Object) β πΊ Memory Usage Problem
Hi everyone
Iβm running into a memory issue in my WinForms application.
I have a StudentDTO
which contains an Address class
that wraps a COM object.
The Grid is bound to a collection of these DTOs.
Data comes from an Object Server (C++ framework) that works like an ORM:
Tracks new/modified data.
On save, it validates and pushes changes to SQL backend.
Problem: When I bind DTOs to the Grid, memory usage keeps increasing because each row holds a COM object.
Question: Whatβs the best way to reduce or optimize memory usage when working with DTOs that wrap COM objects in a C# WinForms app?
Any tips, patterns, or best practices would be super helpful!
I have a StudentDTO
The Grid is bound to a collection of these DTOs.
Data comes from an Object Server (C++ framework) that works like an ORM:
Tracks new/modified data.
On save, it validates and pushes changes to SQL backend.