What is Heap in C# memory?

 Posted by Goud.Kv on 9/3/2014 | Category: C# Interview questions | Views: 1501 | Points: 40

Heap is a dynamic memory block.
It is derived to store objects such as reference type instances.
Any object that is created in a method gets allocated in the Heap and returns that object reference.

During the execution of the program, Objects get filled in the Heap.

Cleaning of objects from the Heap is done by the runtime's Garbage Collector. This will helps our computer to perform faster.

Heap is capable of storing static fields and constants.

Asked In: Spotted While Learning | Alert Moderator 

Comments or Responses

Login to post response