About Garbage Collector?
Answers were Sorted based on User's Feedback
Answer / sayeed
Garbage collection is an in deterministic process Associated
with CLR. It is used to release the managed free Objects
that are no more refrenced.
But there might be scenarios in which we need to release
certain resources held by an object (like a database
connection) once the object is no longer in use.
We have destructors in C#.C# destructors are nothing but
finalize methods in disguise, with a call to base class's
finalize method.
As we know, finalize method is called during garbage
collection by garbage collector. Hence, we cannot rely only
on C# destructors to explicitly release resources as
finalize methods on objects may never be called altogether
(if the program terminates abnormally) or might be called
only when the program terminates (in a normal way).
Hence it is always a good practice to implement IDisposable
interface in such cases and to write code to release
resources explicitly in the Dispose() method.In that case we
have to use GC.SuppressFinalize() method.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / seshu
garbage collection is a form of automatic memory management.
The garbage collector attempts to reclaim garbage or memory
used by objects that will never be accessed or mutated again
by the application.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sivaprasad
i)GarbageCollector will take care about Automatic Memory
Management it will mark the objects which has Referrence
Count is Zero.
ii)One Background Thread running in the Application with
Normal Priority And Marking The Objects Which has Referrence
Count is Zero.when there is no Applications Threads Are
Running it will Take High Priority.
iii)And this Garbage Collector Will Take Care About
"Circularreferrences"(means One Pair Of Objects Referring To
Each Other)
Is This Answer Correct ? | 0 Yes | 1 No |
Why we use asp.net for website development?
What is difference between session and viewstate?
Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines?
What is the difference between GridView and Repeater controls in ASP.NET?
What is Forms Authentication in ASP.NET?
Differentiate an ADO.NET Dataset and an ADO Recordset with its functionality?
Which control would you use if you needed to make sure the values in two different controls matched?
1.What r collections? 2.What is .pdb file? 3.Is it possible to provide access to users in master page? 4.What is dirty n Phantom Read(SQL)? 5.What r different isolation levels(SQL)? 6.How to set authentication mode in web.config file?
How do I use a proxy server when invoking a web service?
if u r projet consist of 4 people means how can u manage the file
Is it possible for me to change my aspx file extension to some other name?
How can you handle exceptions in asp.net?