Who deletes variables stored in stack
-
Hi Friends, In .NET there are two kind of variables. One is stored in HEAP (objects) .. some are in Stack. Now how these memory is clened. Who takes care of Stack and Heap once the execution is over.
Thanks, Arindam D Tewary
-
Hi Friends, In .NET there are two kind of variables. One is stored in HEAP (objects) .. some are in Stack. Now how these memory is clened. Who takes care of Stack and Heap once the execution is over.
Thanks, Arindam D Tewary
The memory allocation in the stack is done when a method is called, and the stack is restored when the method returns. The heap is managed by the garbage collector. At certain intervals it runs a sweap that removes unused objects.
--- single minded; short sighted; long gone;
-
The memory allocation in the stack is done when a method is called, and the stack is restored when the method returns. The heap is managed by the garbage collector. At certain intervals it runs a sweap that removes unused objects.
--- single minded; short sighted; long gone;
Thanks Guffa. :-D
Thanks, Arindam D Tewary