Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8747541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:22:23+00:00 2026-06-13T12:22:23+00:00

I’m working on somewhat large application that is divided into groups by functionality. Since

  • 0

I’m working on somewhat large application that is divided into groups by functionality. Since every functionality is mostly independent (they all use the same database, but there is no direct interaction between different functionalities), I’m using the user defined controls and treating them as individual “applications”. The way the application works is this:

  • The “root” application only contains the main menu and 2 panels. The main menu is used to select the group of functionalities.
  • After the group is selected (on application startup the first group is automatically selected), the functionalities (represented by buttons) from that group are displayed in the first panel.
  • The user selects the functionality (by clicking on the appropriate button) he/she wants and the user control that contains the “form” is displayed in the second panel.
    The code that displays all of the user controls looks like this:

        panel2.Controls.Clear();
        UserControl1 uc1 = new UserControl1();
        uc1.Location = new Point(0, 0);
        panel2.Controls.Add(uc1);
        label6.Text = "User control 1";
    

So, when the user selects one of the functionalities, the application clears existing controls, and displays the selected one.
The application works fine (the part I implemented so far), so this is my question – how does this approach manage computer resources, mainly the memory. Specifically, if the user uses one functionality, and then switches to another one, will the .NET’s services release the memory used by the previous functionality (I think garbage collector is in charge of that) and will the SQL connections, that I use to communicate with the database, be closed?
Also, are there some other issues that I should be aware of?
As I said, the functionalities work properly, but I’m still very far from full testing of the application as a whole (I only test every functionality individually when I create it, and only on the computer I create it on, so I can’t consider it as a proper testing). Because of that, I am worried that the application’s performances might deteriorate if the application is constantly used over a longer period of time.
I’m using VS 2010 (C#) and SQL Server 2005 to create this application.
If you have any suggestions, please write them. With this question, I’m trying to prevent major reconstructions of the application once it comes to the phase of testing and implementing due to bad resource management.
Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T12:22:24+00:00Added an answer on June 13, 2026 at 12:22 pm

    Garbage collector is in charge of freeing up the memory that belongs to objects that are not referenced anywhere. If your Windows Forms’ Form shows many controls at once, they are all somehow referenced by the form at the time, so the GC won’t clean anything up here, you need to be careful not to load too many objects in these controls. Furthermore, you may run into memory issues if you do not properly Dispose the controls before calling the panel2.Controls.Clean().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace
I am doing a simple coin flipping experiment for class that involves flipping a
I know there's a lot of other questions out there that deal with this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.