π₯οΈ 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!
0 Replies