Aryan PrajapatKnowledge Contributor
What part of memory – Stack or Heap – is cleaned in the garbage collection process?
What part of memory – Stack or Heap – is cleaned in the garbage collection process?
On Heap memory, garbage collection is employed to release the memory used by objects with no references. Every object created in the Heap space has access to the entire application and may be referred to from anywhere.