ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  Dot Net  >>  Dot Net Framework
 
 


 

 
 Dot Net Framework interview questions  Dot Net Framework Interview Questions
 Dot Net Remoting interview questions  Dot Net Remoting Interview Questions
 Dot Net WindowsForms interview questions  Dot Net WindowsForms Interview Questions
 Dot Net General interview questions  Dot Net General Interview Questions
 Dot Net AllOther interview questions  Dot Net AllOther Interview Questions
Question
If we not suppress finalize method in dispose what will happen?
 Question Submitted By :: Swapna
I also faced this Question!!     Rank Answer Posted By  
 
  Re: If we not suppress finalize method in dispose what will happen?
Answer
# 1
Dispose methods can be called automatically, if client 
forget to call it.
for this ,Call the Dispose method in Finalize method and in 
Dispose method suppress the finalize
method using GC.SuppressFinalize. Below is the sample code 
of the pattern. This is the
best way we do clean our unallocated resources and yes not 
to forget we do not get the hit
of running the Garbage collector twice.

Public Class ClsTesting
    Implements IDisposable
Public Overloads Sub Dispose()Implements IDisposable.Dispose
' write ytour clean up code here
GC.SuppressFinalize(Me)
End Sub

Protected Overrides Sub Finalize()
Dispose()
End Sub
End Class
 
Is This Answer Correct ?    0 Yes 2 No
Seema Dalal
 

 
 
 
Other Dot Net Framework Interview Questions
 
  Question Asked @ Answers
 
What is MSIL, IL, CTS?  3
Can u tell me differences which are introduced in .Net 1.1 and 2.0 and 3.0 and also in 3.5 ? by detailed? ABC1
Which is the best institute in chennai to learn DotNet?  6
How do assemblies find each other?  1
If Controller is not there in MVC Pattern what happens?  1
will this code works fine? or will it gives error? Object obj=5; int i=6; i=i+obj; Kanbay7
Can two application one using private assembly and other using Shared assembly be stated as a side-by-side executables?  1
If you are using components in your application, how can you handle exceptions raised in a component ? Accenture3
Can you draw and explain the .NET Farmework? Bosch2
What are the mobile devices supported by .net platform  1
How to add 'ASPNET.mdf' file into server explorer in visual studio 2005?  2
What is shared and private assembly ? Accenture2
Can we look at the IL for an assembly?  2
What is "out" parameter how it is used in methods? Polaris6
What is .NET Framework?  3
How the framework differentiate between 2 version dlls? eg Version 2.0 and 2.1 dlls are there. both are referred in the code.but we are using only name of that dll not the version number. in run time how the framework know which dll has to be referred? Deloitte1
What is side by side Execution ? MMTS3
Types of assemblies that can be created in dotnet ? MMTS1
How does assembly versioning work?  1
Httpcontext objects? HP2
 
For more Dot Net Framework Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com