Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Dot Net Technologies Interviews:.Net Architecture.Net Database.Net Deployment.NET web servicesADO.NETADO.NET 2.0ASP ProgrammingASP.NetASP.NET 2.0ASP.NET CachingASP.Net MVCBizTalkC# (Sharp) Programming LanguageCOM+Crystal ReportsDataGrid (Grid view)Dot NetDot Net AssemblyDot Net Code SecurityDot NET crystal reportsDot Net FrameworkDot Net RemotingDot Net WindowsFormsEntity FrameworkMicrosoft .Net MobileMicrosoft BasicsMicrosoft.NETMicrosoft.NET 2.0Mixed MicrosoftMono FrameworkMOSSMSFMTSReporting ServicesSenior .Net DeveloperVB .NetVB .Net DeveloperVB.NET FrameworkWCF (Windows Communication Foundation)WCF Data ServicesWeb Forms
Copyright © 2018. All Rights Reserved
Microsoft.NET Interview Question:
Explain garbage collection?
Submitted by: AdministratorThe automatic memory management scheme employed by the .NET Framework (CLR) is called garbage collection.
Unused memory is automatically reclaimed by garbage collection without interaction with the application
The garbage collector is a low-priority thread that always runs in the background of the application under normal circumstances. It operates when processor time is not consumed by more important tasks. When memory becomes limited, however, the garbage collector thread moves up in priority. Memory is reclaimed at a more rapid pace until it is no longer limited, at which point the priority of garbage collection is again lowered.
in c# memory is divided in five blocks stack,heap,Global,static,& the code block..all the objects created in the heap block(the total size of heap block is 64 mb)whn the heap block is about to full the gc(garbaze collector)automatically invokes & it deletes all those objects which are not in use or not pointing anywhere..in other words we can say dat the GC free the memory by deleting the unused objects or references.
a user never know when GC runs or invokes becz it runs automatically when d heap memory is going to full..
GC takes cares of heap block not stack block so it is good for the user to create any number of objects without care of memory. c# launches new features of garbage collection before c# (in any languages like c or c#)whn a user create a object it thinks first about memory and after dat its user responsibility to free d memory bt this is not d case in c# bcoz GC automatically takes cares of MEMORY MANAGMENT
Submitted by: Administrator
Unused memory is automatically reclaimed by garbage collection without interaction with the application
The garbage collector is a low-priority thread that always runs in the background of the application under normal circumstances. It operates when processor time is not consumed by more important tasks. When memory becomes limited, however, the garbage collector thread moves up in priority. Memory is reclaimed at a more rapid pace until it is no longer limited, at which point the priority of garbage collection is again lowered.
in c# memory is divided in five blocks stack,heap,Global,static,& the code block..all the objects created in the heap block(the total size of heap block is 64 mb)whn the heap block is about to full the gc(garbaze collector)automatically invokes & it deletes all those objects which are not in use or not pointing anywhere..in other words we can say dat the GC free the memory by deleting the unused objects or references.
a user never know when GC runs or invokes becz it runs automatically when d heap memory is going to full..
GC takes cares of heap block not stack block so it is good for the user to create any number of objects without care of memory. c# launches new features of garbage collection before c# (in any languages like c or c#)whn a user create a object it thinks first about memory and after dat its user responsibility to free d memory bt this is not d case in c# bcoz GC automatically takes cares of MEMORY MANAGMENT
Submitted by: Administrator
Copyright 2007-2025 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.

https://InterviewQuestionsAnswers.ORG.
