[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 524
  • Last Modified:

Destructor

What is a protected abstract virtual base pure virtual private destructor?
0
BaluVasudev
Asked:
BaluVasudev
  • 2
1 Solution
 
customizeCommented:
It is a pure virtual private destructor that is inherited from a protected abstract virtual base. In other words, a destructor function that can only be called by members or friends of the class (private), and is assigned a 0 (pure virtual) in the base class (abstract base) that declares it, and will be defined later / overriden in a derived class that shares the multiply-inherited base (virtual base) in a protected way.
class y : virtual protected x
{

private:
~y() = 0;

};


class z : protected y { };
In this instance, ~y() is a protected abstract virtual base pure virtual private destructor of z.

http://blog.360.yahoo.com/blog-1ViKHp06aKQOW02wZ.Cpozw-?cq=1&p=160
0
 
rajeev_devinCommented:
>> What is a protected abstract virtual base pure virtual private destructor?
I don't know what you mean ;-)
0
 
jhshuklaCommented:
if i am not wrong, aren't virtual destructors in base classes required to be protected or public? how else can a derived object cease to exist? as far as i know, after the derived destructor executes, the base destructor is called and if it is private then god help you get out of the mess.
0
 
rajeev_devinCommented:
>> if i am not wrong, aren't virtual destructors in base classes required to be protected or public?
I totally agree with you :)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now