Problem: too many GDI objects in memory

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all.
I have a very frustrating problem with my VB applications (developed with
VS2002/.Net1.0):
every application (even "stupid" two-forms application :-( ) seems to
allocate GDI resources when a form is "opened" and doesn't release them
after closing.
This "problem" (or bug? or coding error?) causes my application to become
very "slow" and a BIG number of allocated GDI objects.

Can you help me? Any idea about to solve this behaviour of .NET1.0?
Maybe the problem is VS2002 and .NET1.0: I read on the net of a lot of
memory-leak problems using GDI technology with .Net1.0. I'll solve my
problem upgrading to VS2003?
Thanks in advance for your answers.
 
Are you disposing all the IDisposable objects allocated? GDI objects need
clean-up to free their handles, and if they aren't disposed, the handle
leaks because the lack of thread safety in GDI means that the handles can't
be freed on the finalizer thread.

Nick Wienholt, MVP
Maximizing .NET Performance
http://www.apress.com/book/bookDisplay.html?bID=217
Sydney Deep .NET User Group www.sdnug.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Problem: too many GDI objects in memory 2
Gdi objects and memory leak 7
GDI leaks? 1
GDI object usage 2
listview, gdi objects, GC 2
ListView GDI object leaks? 1
GDI leakage in Excel 2007 7
Bug in GDI+ DrawString 5

Back
Top