What is the Difference B/W Finalize() and Dispose() in .Net?
Answers were Sorted based on User's Feedback
Answer / nishant
To Release the Memory Occupied by Object by implicit way
then use finalize() Method...And release the Memory by
Explicit Way then Use dispose() Method..
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sushma
A Dispose() method is explicit, meaning you code Dispose()
up and explicitly call it in your application or system
code. A Finalize() method is implicit, meaning you code
Finalize() up but never actually call it — Finalize() is
called behind the scenes by the .NET GC mechanism.
The GC call the Finalize() function automatically to destroy
the object called implicit destroy. when you want to destroy
a objects that you think no longer need and free it from
memory, then we will use the dispose function. For better
performance we will use the dispose function explicitly.
| Is This Answer Correct ? | 5 Yes | 7 No |
What is the Intermittent crashing of application in production?
Describe the difference between inline and code behind - which is best in?
Explain the page lifecycle of an asp.net mvc? : asp.net mvc
how we declare interface
Security types in ASP/ASP.NET? Different Authentication modes?
4 Answers QuadLabs Technologies,
What is session tracking & methods?
What is the other method, other than GET and POST, in ASP.NET?
relacement of websevices in .net 3.0?
How to remove cache object in asp.net?
What methods are fired during the page load?
Explain how caching in asp.net 2.0 is different from caching in asp.net 1.1?
What is inheritance and an how it be used, example with an example?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)