If I make any object for example :
Emp obj= new Emp();
So who clr , system(OS) or garbage collector will allocate memory to
obj object in heap ?
1. Extract 1 :Which concludes garbage collector is responsible.
From micorsoft
link -<a href="https://msdn.microsoft.com/en-us/library/f144e03t(v=vs.110).aspx">
</a>
Extract :When the application creates the next object, the garbage collector allocates memory for it in the address space immediately following the first object. As long as address space is available, the garbage collector continues to allocate space for new objects in this manner.
2.Extract 2: Which concludes clr will be responsible for memory allocation and gc will only be called if heap is full.
link -
[
^]
Can anybody really tell me if gc is really responsible for allocating memory to an object.
What I have tried:
1. Extract 1 :Which concludes garbage collector is responsible.
From micorsoft
link -<a href="https://msdn.microsoft.com/en-us/library/f144e03t(v=vs.110).aspx">
</a>
Extract :When the application creates the next object, the garbage collector allocates memory for it in the address space immediately following the first object. As long as address space is available, the garbage collector continues to allocate space for new objects in this manner.
2.Extract 2: Which concludes clr will be responsible for memory allocation and gc will only be called if heap is full.
link -
[
^]