1
Answer

How can i reduce these GDI and User objects in .NET MDI form

Dear all,
I am working on .Net3.5 windows application.The project is for call center people.While calls are coming and attempting to give some data, the GDI objects and user objects are continuously increasing.After i made 100 calls the GDI and User objects range will be greater than 4000 so at that time application is not working.

So how can i reduce these GDI and User objects in MDI form

Answers (1)

0
Photo of Vulpes
NA 98.3k 1.5m 13y
Well, if you're not doing it already, one thing you can do is to call Dispose() on these objects when you no longer need them (to release unmanaged resources) and set any references to them to null so that the GC can (in due course) clean up the managed memory they use.

Rather than creating new objects, I'd also consider reusing existing objects where feasible by assigning references to them to fields rather than to local variables so that they are available to all methods in your form.