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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:18:42+00:00 2026-06-05T05:18:42+00:00

In C# I understand that static variables are created in memory and live as

  • 0

In C# I understand that static variables are created in memory and live as long as the AppDomain lives. How do static methods get treated in memory? Do methods get created on the stack/heap like variables? Is there such a thing as method GC? How does this relate to the Call Stack, if it all?

  • 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-05T05:18:44+00:00Added an answer on June 5, 2026 at 5:18 am

    Methods live in the code segment, neither in the heap or the stack. The code is just loaded into memory, and stays there as long as the AppDomain lives.

    Static methods and non-virtual methods just have an address, and the code uses the address directly when calling the method.

    Virtual methods also have an address, but it’s not used directly. There is a pointer to the method in the virtual method table that is associated to the class, so the code gets the pointer from the table to find the method.

    The call stack is just another term for the stack.

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

Sidebar

Related Questions

I understand that static method inheritance is not supported in C#. I have also
I understand that dynamic/static polymorphism depends on the application design and requirements. However, is
I understand that the standard says that the size of a long integer is
We say that global variables and static variables are always initialized to 0. Then
I've created a class that uses a static NSSet to define some elements shared
I understand that one benefit of having static member functions is not having to
I have learned that in a class you can declare variables and methods. They
I understand that this a very noob problem, but when I try to create
I understand that in a built-in Django filter called date . I want to
I understand that this may not necessarily apply to just @properties, but they would

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.