Β© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
C
C#
β’
6mo ago
Anburaj Marikkani
π₯οΈ 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
!
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
WinForms problem with SQLite
C
C# / help
2y ago
Problem with Winforms debug
C
C# / help
2y ago
c# winforms size
C
C# / help
9mo ago
C# WinForms Chat
C
C# / help
2y ago