From owner-svn-src-head@freebsd.org Fri Jan 26 14:32:50 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8288CED97E7 for ; Fri, 26 Jan 2018 14:32:50 +0000 (UTC) (envelope-from marklmi26-fbsd@yahoo.com) Received: from sonic309-20.consmr.mail.gq1.yahoo.com (sonic309-20.consmr.mail.gq1.yahoo.com [98.137.65.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB57975634 for ; Fri, 26 Jan 2018 14:32:49 +0000 (UTC) (envelope-from marklmi26-fbsd@yahoo.com) X-YMail-OSG: u.fQvTUVM1muMFWtpHxoS7AZMxYkIR7sx4N06HWgRxS3o5IBNJVVhGKAkpXSzb9 XHL2gGbKHZgC0C.wiw9vLD1UBOxwVXfPB.456dtKATvQ4Lcmq.jtbMrsJeqa0FNLr8a0mJflCuOX rVy86ZkBQH4ALmvMfc_7leh2LIkmlr3.VWemzmgcPMX26Ik3Z6_TInjMs9PmSrNZ3AwlH5Y9HBtg qkV4kvXWmBb_Wsee10RGDJCKYCv0jazmPIN8accNVnEqoHiAaJDBavGW.p2_J.ik.X5JF54h2kgg IwliGWRAMsS361rOUOcX6HUtCXMvRPDbcVJeI0Mkfahyp9..YaKOTWDgXTIqFO1PIBQrXzJYLWsd g1snfGUGdlOPI_GOl84IWb8gru9iUkJ.yrjcqL7I.08eSyFV4LOaVBIlupH09PhbNrBid9Puc4zk Kc9RD6RW6I0q7eBcOqNa3XtFDzAfa8sHb_tYpT.yFY1uqIh2IJ7JaQPDuJap4Lgn03M.t Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.gq1.yahoo.com with HTTP; Fri, 26 Jan 2018 14:32:48 +0000 Received: from smtp102.rhel.mail.gq1.yahoo.com (EHLO [192.168.1.25]) ([216.39.57.211]) by smtp403.mail.gq1.yahoo.com (JAMES SMTP Server ) with ESMTPA ID ec7ec8fb1ea2bbdb2f0da6fa5651ea62 for ; Fri, 26 Jan 2018 14:22:37 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: svn commit: r328430 - head/sbin/devd Message-Id: <7F6D11A1-70B6-4A7E-9D5D-93E2C9F8E368@yahoo.com> Date: Fri, 26 Jan 2018 06:22:36 -0800 To: svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3445.5.20) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jan 2018 14:32:50 -0000 Warner Losh imp at bsdimp.com wrote on Fri Jan 26 06:02:04 UTC 2018 : > It's a flaw in C++ that you have a choice here. All dtors should be > virtual because you never know when you'll have new derived classes and > have to hunt down a hard-to-find bug because you didn't go back and make it > virtual. The "C++ Coding Standards" book described it this way: QUOTE To delete, or not to delete, that is the question: if deleting through a pointer to base Base should be allowed, then Base's destructor must be public and virtual. Otherwise, it should be protected and nonvirtual. . . . Corollary: Always write a destructor for a base class, because the implicitly generated one is public and nonvirtual. END QUOTE See page 90 for more. === Mark Millard marklmi at yahoo.com ( markmi at dsl-only.net is going away in 2018-Feb, late)