Michael Sullivan wrote: > On Fri, 2007-11-30 at 18:31 -0700, Thomas Hruska wrote: >> Michael Sullivan wrote: >>> What is a non-virtual destructor? Does this mean that there are >>> virtual destructors too? How do I define one? Would it just be >>> >>> virtual ~Character(); >>> >>> Like that? I have two classes that subclass Character, and the >> method >>> in question will be handled slightly differently in each of them, so >> I >>> wanted to make the method virtual... >> Read the chapter in Safe C++ Design Principles on Base Classes vs. >> Templates. It clearly describes when and how to use virtual >> destructors. Basic rule of thumb: If you derive from any class, all >> classes involved MUST have a virtual destructor to be cleaned up >> properly at runtime when the objects are no longer needed. > > I don't suppose there's a .pdf version of that anywhere? I run > Linux. .exe files don't work so well for me...
That's one of the things I'm going to fix for Second Edition (the fabled Second Edition is still in the pipeline). In the meantime, what works for most people is to install the EXE on a Windows box and copy the files over (it should also, in theory, run under Wine). The main book is in PDF format. I just bundled it with other files in a shiny installer - a mistake I won't repeat. -- Thomas Hruska CubicleSoft President Ph: 517-803-4197 *NEW* MyTaskFocus 1.1 Get on task. Stay on task. http://www.CubicleSoft.com/MyTaskFocus/
