Getting Started with Adobe After Effects - Part 6: Motion Blur
This module helps you to share, discuss and learn interview questions and answers of different technologies

C# - Where memory for static variables will be allocated?

Mar 30 2012 12:00AM by Ramireddy   

Question

Recently i faced this question, "Where memory for static variables will be allocated?"

Answer

When a static variable is allocated, it will be stored as part of Methodtable. When a class is loaded first time in application, separate memory will be allocated in appdomain for class level variables and methods inside class. This data structure is called Methodtable.

If static variable is primitive type, it will be stored as part of Methodtable. If it is reference type, it will be stored inside the heap and the reference will be stored in Methodtable.

Read More..   [32134 clicks]

Published under: C# Interview Questions and Answers ·  ·  ·  · 


Ramireddy
2 · 41% · 12972
0
Liked
 
0
Asked



Submit

Your Comment


Sign Up or Login to post a comment.

"C# - Where memory for static variables will be allocated?" rated 5 out of 5 by 9 readers
C# - Where memory for static variables will be allocated? , 5.0 out of 5 based on 9 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]