+ Reply to Thread
Results 1 to 2 of 2

Thread: What is Garbage collection?

  1. #1

    What is Garbage collection?

    Hi,

    What is Garbage collection and what does it do?

  2. #2
    Whenever you are working with application , when an integer or a string value has been set or any other stuff you store in application
    is stored in RAM , and when you close the application the whole application`s memory resources is released , that`s called Garbage collection
    but what if you want to free memory during the application is being run.

    lets say you got string number = "123456";

    To do a Garbage collection , you need to do two steps :
    1- make number = null;
    2- do that >>> GC.Collect();

    By that you have release that string memory resources , of course Garbage collection is being used to free up memory usage of 1GB
    because most of applications that import files into it to do some operation or reading file , take a huge amount of RAM.

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts