Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / July 2007

Tip: Looking for answers? Try searching our database.

memory not being released

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
gigel - 20 Jul 2007 17:01 GMT
Hello all,

I have a winforms app running on framework v2.0.50727 which isn't not
releasing memory back to the OS after closing forms. Simple forms (a list +
button)
or complex  ones (tabs, lots of text boxes, third party masked edit control)
behave the same way,
Every time is instantiated it allocates memory which never gets released.

The code sequence is
Dim frCustomer As New frmCustomer
..
custom code to populate form
...
frCustomer.ShowDialog()
frCustomer.Dispose()
If Not frCustomerIs Nothing Then frCustomer= Nothing

Where should I start troubleshooting? What am I doing wrong.

Thanks a million,

Gigel
AlexS - 20 Jul 2007 19:14 GMT
Use profiler - see
http://www.microsoft.com/downloads/details.aspx?familyid=a362781c-3870-43be-8926
-862b40aa0cd0&displaylang=en


You can find out if memory is really staying allocated and why

> Hello all,
>
[quoted text clipped - 19 lines]
>
> Gigel
news.microsoft.com - 23 Jul 2007 15:39 GMT
You might be missing disposing of components in your form. Check if you dont
have below code then add that to you form

protected override void Dispose(bool disposing)
{
  if (disposing && (components != null))
  {
   components.Dispose();
  }
  base.Dispose(disposing);
}

________________________
sa@openwinforms.com
http://www.openwinforms.com/
OpenWinForms - open source windows forms and controls
Google group - http://groups.google.com/group/open-winforms

> Hello all,
>
[quoted text clipped - 19 lines]
>
> Gigel

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.