Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
What is garbage collection
What is garbage collection?
✍: fyicenter.com
Garbage collection is a CLR feature which automatically manages memory. Programmers forget to release the objects while coding ..... Laziness (Remember in VB6 where one of the good practices is to set object to nothing). CLR automatically releases objects when they are no longer in use and refernced. CLR runs on non-deterministic to see the unused objects and cleans them. One side effect of this non-deterministic feature is that we cannot assume an object is destroyed when it goes out of the scope of a function.we should avoid using destructors because before GC destroys the object it first executes destructor in that case it will have to wait for code to release the umanaged resource. resultin in additional delays in GC. So its recommended to implement IDisposable interface and write cleaup code in Dispose method and call GC.SuppressFinalize method so instructing GC not to call your constructor. For more details read Why is it preferred to not use finalize for clean up? in OOPS chapter..
2007-10-22, 4740👍, 0💬
Popular Posts:
How To Get the Last ID Assigned by MySQL? - MySQL FAQs - Managing Tables and Running Queries with PH...
Which is the best place to store ConnectionString in Dot Net Projects? I am about to deploy my first...
What is difference between SITP and UTP in testing ? UTP (Unit Test Plan) are done at smallest unit ...
How To Use Subqueries with the IN Operator? - MySQL FAQs - SQL SELECT Statements with JOIN and Subqu...
What is DAR (Decision Analysis and Resolution) ? Decision Analysis and Resolution is to analyze poss...