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 6960421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:24:00+00:00 2026-05-27T15:24:00+00:00

My background is with web application (PHP), you requested a page, run your code

  • 0

My background is with web application (PHP), you requested a page, run your code to handle that request and the the process is over, you generally don’t have to worry to much about un-setting variables and things like that since the process is done once the page loads.

Looking into some desktop application development with C#, just curious how this differs from the web. Say I launch the program, a user does some actions, the program is not done like a web app would be, so what do you do differently? Do you have to be conscious about un-setting variables and things when finished with them to prevent memory waste?

  • 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-05-27T15:24:01+00:00Added an answer on May 27, 2026 at 3:24 pm

    Most web programming is stateless. With desktop programming, your individual functions are usually stateless. You’ll pass in all of the information you need as parameters, and get everything you need back out. However, the main program will store some state.

    Rich Internet Applications often keep state, and some websites use the HTML content itself as state, and update it through Javascript, etc.

    The User Interface of a desktop programming is similar. The edit and various other controls store some state. You’ll store some global variables for things like user settings, which you can think of similar to session variables. Running an application is similar to having a session.

    Desktop programming is also highly event based. Quite often, a program will be sitting there waiting for the user to click on a button or something. So, usually we’re talking Windows and event handlers. You might be familiar with these in Javascript.

    C# does garbage collection, so you don’t really have to worry about deleting variables. As soon as they go out of scope, they’re usually cleaned up. Global class variables won’t be cleaned up until the application shuts down, and you don’t have to clear variables when you shut down the application. They’ll all disappear when the process ends, just like PHP.

    Don’t use global variables (which don’t go out of scope) inside a function, when you should be using local ones.

    PHP has local and global variables too, so this should be familiar territory.

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

Sidebar

Related Questions

background: I work on an asp.net web application that is on a company intranet.
First some background: VB.NET 2005 Application that accesses a MS-SQL back-end, using multiple Web
Background Information: I'm part of a team of developers that runs a web application
First Some Background I'm planning out the architecture for a new PHP web application
I have a PHP application that calls web services APIs to get some objects
Background to question: We are building an online web application that requires the user
I've written a C/CGI web application for booking items. My client has requested that
I'm from a PHP background. All I know is that web server handles the
We run our web application wehre we start some Threads for background work and
Background: I'm writing a 'standard' (nothing special) web application in Ruby (not Rails) and

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.