Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#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# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

WinForms problem with SQLite
C#CC# / help
2y ago
Problem with Winforms debug
C#CC# / help
2y ago
c# winforms size
C#CC# / help
9mo ago
C# WinForms Chat
C#CC# / help
2y ago