How many destructors may a class contain? What is the main purpose of the destructor? When is this function called and who may call it?
What will be an ideal response?
The class may have only one destructor function. Its job is to take care of any business for the object before it goes out of scope, such as closing files, releasing memory, etc. The operating system automatically calls it when the object is going out of scope.
You might also like to view...
Which of the following statements is false?
a. The command window in Windows is called a Command Prompt. b. The command window in OS X is called a Terminal. c. The command window in Linux is called the shell. d. All of the above are true.
How would you implement the equivalent of a remote procedure call using a tuple space? What are the advantages and disadvantages of implementing a remote procedure call–style interaction in this way?
What will be an ideal response?