Categories:
.NET (357)
C (330)
C++ (184)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (2)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Struts (1)
Windows (1)
XHTML (173)
Other Resources:
Virtual Destructor - What is the need for “Virtual Destructor”?
Virtual Destructor - What is the need for “Virtual Destructor”?
✍: .fyicenter.com
Destructors are declared as virtual because if do not declare it as virtual the base class destructor will be called before the derived class destructor and that will lead to memory leak because derived class’s objects will not get freed.Destructors are declared virtual so as to bind objects to the methods at runtime so that appropriate destructor is called.
2012-04-03, 3840👍, 0💬
Popular Posts:
What is the quickest sorting method to use? The answer depends on what you mean by quickest. For mos...
1. What is normalization. 2. Difference between procedure and functions. 3. Oracle 9i Vs 10g. 4. how...
How can you implement MVC pattern in ASP.NET? The main purpose using MVC pattern is to decouple the ...
Can a variable be both const and volatile? Yes. The const modifier means that this code cannot chang...
What will be printed as the result of the operation below: #define swap(a,b) a=a+b;b=a-b;a=a-b; void...