Bug 1035650, part 4: Fix public destructors everywhere else, r=Neil a=bustage fix on CLOSED TREE
authorJoshua Cranmer <Pidgeot18@gmail.com>
Wed, 09 Jul 2014 09:04:59 -0500
changeset 20461 21e13ac2fe1f124fd027a0b1b111c6b04154f443
parent 20460 8374fc73b34e55b2851f8ce71a78792124871e41
child 20462 c9e1ebd968547d16b9fc48736a65621997b95e7c
push id1209
push usermbanner@mozilla.com
push dateTue, 02 Sep 2014 16:59:36 +0000
treeherdercomm-beta@842e0fd167ee [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersNeil, bustage
bugs1035650
Bug 1035650, part 4: Fix public destructors everywhere else, r=Neil a=bustage fix on CLOSED TREE
db/mork/build/nsMorkFactory.cpp
db/mork/src/morkObject.h
ldap/xpcom/src/nsLDAPBERValue.h
ldap/xpcom/src/nsLDAPConnection.h
ldap/xpcom/src/nsLDAPControl.h
ldap/xpcom/src/nsLDAPMessage.h
ldap/xpcom/src/nsLDAPModification.h
ldap/xpcom/src/nsLDAPOperation.h
ldap/xpcom/src/nsLDAPServer.h
ldap/xpcom/src/nsLDAPService.h
ldap/xpcom/src/nsLDAPSyncQuery.h
ldap/xpcom/src/nsLDAPURL.h
mail/components/migration/src/nsEudoraProfileMigrator.h
mail/components/migration/src/nsNetscapeProfileMigratorBase.h
mail/components/migration/src/nsSeamonkeyProfileMigrator.h
mail/components/shell/DirectoryProvider.h
mailnews/addrbook/src/nsAbAddressCollector.h
mailnews/addrbook/src/nsAbBooleanExpression.h
mailnews/addrbook/src/nsAbCardProperty.cpp
mailnews/addrbook/src/nsAbCardProperty.h
mailnews/addrbook/src/nsAbContentHandler.h
mailnews/addrbook/src/nsAbDirFactoryService.h
mailnews/addrbook/src/nsAbDirProperty.h
mailnews/addrbook/src/nsAbDirectoryQuery.h
mailnews/addrbook/src/nsAbDirectoryQueryProxy.h
mailnews/addrbook/src/nsAbLDAPCard.h
mailnews/addrbook/src/nsAbLDAPChangeLogData.h
mailnews/addrbook/src/nsAbLDAPDirFactory.h
mailnews/addrbook/src/nsAbLDAPDirectoryModify.cpp
mailnews/addrbook/src/nsAbLDAPDirectoryQuery.cpp
mailnews/addrbook/src/nsAbLDAPDirectoryQuery.h
mailnews/addrbook/src/nsAbLDAPReplicationData.h
mailnews/addrbook/src/nsAbLDAPReplicationQuery.h
mailnews/addrbook/src/nsAbLDAPReplicationService.h
mailnews/addrbook/src/nsAbLDIFService.h
mailnews/addrbook/src/nsAbMDBDirFactory.h
mailnews/addrbook/src/nsAbManager.h
mailnews/addrbook/src/nsAbOSXCard.h
mailnews/addrbook/src/nsAbOSXDirFactory.h
mailnews/addrbook/src/nsAbView.h
mailnews/addrbook/src/nsAddbookProtocolHandler.h
mailnews/addrbook/src/nsAddbookUrl.h
mailnews/addrbook/src/nsAddrDatabase.cpp
mailnews/addrbook/src/nsAddrDatabase.h
mailnews/addrbook/src/nsDirPrefs.cpp
mailnews/addrbook/src/nsMsgVCardService.h
mailnews/base/src/MailNewsDLF.h
mailnews/base/src/nsCidProtocolHandler.h
mailnews/base/src/nsCopyMessageStreamListener.h
mailnews/base/src/nsMailDirProvider.h
mailnews/base/src/nsMessenger.cpp
mailnews/base/src/nsMessenger.h
mailnews/base/src/nsMessengerBootstrap.h
mailnews/base/src/nsMessengerContentHandler.h
mailnews/base/src/nsMessengerOSXIntegration.h
mailnews/base/src/nsMessengerUnixIntegration.h
mailnews/base/src/nsMessengerWinIntegration.h
mailnews/base/src/nsMsgAccount.h
mailnews/base/src/nsMsgAccountManager.h
mailnews/base/src/nsMsgBiffManager.h
mailnews/base/src/nsMsgContentPolicy.h
mailnews/base/src/nsMsgCopyService.h
mailnews/base/src/nsMsgDBView.h
mailnews/base/src/nsMsgFolderCache.h
mailnews/base/src/nsMsgFolderCacheElement.h
mailnews/base/src/nsMsgFolderCompactor.h
mailnews/base/src/nsMsgGroupThread.cpp
mailnews/base/src/nsMsgGroupThread.h
mailnews/base/src/nsMsgMailSession.h
mailnews/base/src/nsMsgOfflineManager.h
mailnews/base/src/nsMsgPrintEngine.h
mailnews/base/src/nsMsgProgress.h
mailnews/base/src/nsMsgPurgeService.h
mailnews/base/src/nsMsgRDFDataSource.h
mailnews/base/src/nsMsgServiceProvider.h
mailnews/base/src/nsMsgStatusFeedback.h
mailnews/base/src/nsMsgTagService.h
mailnews/base/src/nsMsgWindow.h
mailnews/base/src/nsMsgXFViewThread.h
mailnews/base/src/nsSpamSettings.h
mailnews/base/src/nsStatusBarBiffManager.h
mailnews/base/src/nsSubscribableServer.h
mailnews/base/src/nsSubscribeDataSource.h
mailnews/base/util/Services.cpp
mailnews/base/util/nsImapMoveCoalescer.h
mailnews/base/util/nsMsgCompressIStream.h
mailnews/base/util/nsMsgCompressOStream.h
mailnews/base/util/nsMsgFileStream.h
mailnews/base/util/nsMsgIdentity.h
mailnews/base/util/nsMsgIncomingServer.h
mailnews/base/util/nsMsgKeyArray.h
mailnews/base/util/nsMsgMailNewsUrl.cpp
mailnews/base/util/nsMsgProtocol.cpp
mailnews/base/util/nsMsgProtocol.h
mailnews/base/util/nsMsgTxn.cpp
mailnews/base/util/nsMsgTxn.h
mailnews/base/util/nsMsgUtils.cpp
mailnews/base/util/nsStopwatch.h
mailnews/db/msgdb/public/nsDBFolderInfo.h
mailnews/db/msgdb/public/nsMsgDatabase.h
mailnews/db/msgdb/public/nsMsgHdr.h
mailnews/db/msgdb/public/nsMsgThread.h
mailnews/db/msgdb/src/nsDBFolderInfo.cpp
mailnews/db/msgdb/src/nsMailDatabase.cpp
mailnews/db/msgdb/src/nsMsgDatabase.cpp
mailnews/db/msgdb/src/nsMsgHdr.cpp
mailnews/db/msgdb/src/nsMsgOfflineImapOperation.h
mailnews/db/msgdb/src/nsMsgThread.cpp
mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp
mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.h
mailnews/extensions/mailviews/src/nsMsgMailViewList.h
mailnews/extensions/mdn/src/nsMsgMdnGenerator.h
mailnews/extensions/smime/src/nsEncryptedSMIMEURIsService.h
mailnews/extensions/smime/src/nsMsgComposeSecure.h
mailnews/extensions/smime/src/nsSMimeJSHelper.h
mailnews/imap/src/nsIMAPBodyShell.h
mailnews/imap/src/nsIMAPHostSessionList.h
mailnews/imap/src/nsImapFlagAndUidState.h
mailnews/imap/src/nsImapMailFolder.cpp
mailnews/imap/src/nsImapMailFolder.h
mailnews/imap/src/nsImapOfflineSync.h
mailnews/imap/src/nsImapProtocol.cpp
mailnews/imap/src/nsImapProtocol.h
mailnews/imap/src/nsImapService.h
mailnews/imap/src/nsImapUtils.h
mailnews/imap/src/nsSyncRunnableHelpers.h
mailnews/import/applemail/src/nsAppleMailImport.h
mailnews/import/eudora/src/nsEudoraCompose.cpp
mailnews/import/eudora/src/nsEudoraFilters.h
mailnews/import/eudora/src/nsEudoraImport.cpp
mailnews/import/eudora/src/nsEudoraImport.h
mailnews/import/eudora/src/nsEudoraSettings.h
mailnews/import/oexpress/nsOEImport.cpp
mailnews/import/oexpress/nsOEImport.h
mailnews/import/oexpress/nsOESettings.h
mailnews/import/outlook/src/nsOutlookCompose.cpp
mailnews/import/outlook/src/nsOutlookImport.cpp
mailnews/import/outlook/src/nsOutlookImport.h
mailnews/import/outlook/src/nsOutlookSettings.h
mailnews/import/src/nsImportABDescriptor.h
mailnews/import/src/nsImportAddressBooks.cpp
mailnews/import/src/nsImportEmbeddedImageData.h
mailnews/import/src/nsImportFieldMap.h
mailnews/import/src/nsImportMail.cpp
mailnews/import/src/nsImportMailboxDescriptor.h
mailnews/import/src/nsImportMimeEncode.h
mailnews/import/src/nsImportService.h
mailnews/import/text/src/nsTextImport.cpp
mailnews/import/text/src/nsTextImport.h
mailnews/import/vcard/src/nsVCardImport.cpp
mailnews/import/vcard/src/nsVCardImport.h
mailnews/import/winlivemail/nsWMImport.cpp
mailnews/import/winlivemail/nsWMImport.h
mailnews/import/winlivemail/nsWMSettings.h
mailnews/intl/nsCharsetConverterManager.h
mailnews/local/src/nsLocalUndoTxn.h
mailnews/local/src/nsMailboxService.h
mailnews/local/src/nsMovemailService.h
mailnews/local/src/nsNoneService.h
mailnews/local/src/nsParseMailbox.h
mailnews/local/src/nsPop3IncomingServer.cpp
mailnews/local/src/nsPop3Service.h
mailnews/local/src/nsPop3Sink.h
mailnews/local/src/nsRssService.h
mailnews/mime/cthandlers/glue/nsMimeContentTypeHandler.h
mailnews/mime/cthandlers/pgpmime/nsPgpMimeProxy.cpp
mailnews/mime/cthandlers/pgpmime/nsPgpMimeProxy.h
mailnews/mime/emitters/nsMimeBaseEmitter.h
mailnews/mime/emitters/nsMimeHtmlEmitter.cpp
mailnews/mime/src/mimecms.cpp
mailnews/mime/src/nsCMS.h
mailnews/mime/src/nsCMSSecureMessage.h
mailnews/mime/src/nsMimeObjectClassAccess.h
mailnews/mime/src/nsSimpleMimeConverterStub.cpp
mailnews/mime/src/nsStreamConverter.h
mailnews/news/src/nsNNTPArticleList.h
mailnews/news/src/nsNNTPNewsgroupList.h
mailnews/news/src/nsNNTPNewsgroupPost.h
mailnews/news/src/nsNNTPProtocol.cpp
mailnews/news/src/nsNewsDownloadDialogArgs.h
mailnews/news/src/nsNewsDownloader.h
mailnews/news/src/nsNntpMockChannel.h
mailnews/news/src/nsNntpService.h
--- a/db/mork/build/nsMorkFactory.cpp
+++ b/db/mork/build/nsMorkFactory.cpp
@@ -4,26 +4,27 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/ModuleUtils.h"
 #include "nsCOMPtr.h"
 #include "nsMorkCID.h"
 #include "nsIMdbFactoryFactory.h"
 #include "mdb.h"
 
-class nsMorkFactoryService : public nsIMdbFactoryService
+class nsMorkFactoryService MOZ_FINAL : public nsIMdbFactoryService
 {
 public:
   nsMorkFactoryService() {};
   // nsISupports methods
   NS_DECL_ISUPPORTS 
 
   NS_IMETHOD GetMdbFactory(nsIMdbFactory **aFactory);
 
 protected:
+  ~nsMorkFactoryService() {}
   nsCOMPtr<nsIMdbFactory> mMdbFactory;
 };
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMorkFactoryService)
 
 NS_DEFINE_NAMED_CID(NS_MORK_CID);
 
 const mozilla::Module::CIDEntry kMorkCIDs[] = {
--- a/db/mork/src/morkObject.h
+++ b/db/mork/src/morkObject.h
@@ -55,17 +55,16 @@ class morkObject : public morkBead, publ
 public: // state is public because the entire Mork system is private
 
   morkHandle*      mObject_Handle;   // weak ref to handle for this object
 
   morkEnv * mMorkEnv; // weak ref to environment this object created in.
 // { ===== begin morkNode interface =====
 public: // morkNode virtual methods
   virtual void CloseMorkNode(morkEnv* ev); // CloseObject() only if open
-  virtual ~morkObject(); // assert that CloseObject() executed earlier
 #ifdef MORK_DEBUG_HEAP_STATS
   void operator delete(void* ioAddress, size_t size)
   { 
     mork_u4* array = (mork_u4*) ioAddress;
     array -= 3;
     orkinHeap *heap = (orkinHeap *) *array;
     if (heap)
       heap->Free(nullptr, ioAddress);
@@ -98,16 +97,17 @@ public: // morkNode virtual methods
   NS_IMETHOD CloseMdbObject(nsIMdbEnv* ev); // called at strong refs zero
   NS_IMETHOD IsOpenMdbObject(nsIMdbEnv* ev, mdb_bool* outOpen);
   // } ----- end ref counting -----
   
 
 protected: // special case construction of first env without preceding env
   morkObject(const morkUsage& inUsage, nsIMdbHeap* ioHeap,
     mork_color inBeadColor);
+  virtual ~morkObject(); // assert that CloseObject() executed earlier
   
 public: // morkEnv construction & destruction
   morkObject(morkEnv* ev, const morkUsage& inUsage, nsIMdbHeap* ioHeap, 
      mork_color inBeadColor, morkHandle* ioHandle); // ioHandle can be nil
   void CloseObject(morkEnv* ev); // called by CloseMorkNode();
 
 private: // copying is not allowed
   morkObject(const morkObject& other);
--- a/ldap/xpcom/src/nsLDAPBERValue.h
+++ b/ldap/xpcom/src/nsLDAPBERValue.h
@@ -18,19 +18,19 @@
 
 class nsLDAPBERValue : public nsILDAPBERValue
 {
 public:
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSILDAPBERVALUE
 
     nsLDAPBERValue();
-    virtual ~nsLDAPBERValue();
     
 protected:
+    virtual ~nsLDAPBERValue();
 
     /** 
      * nsLDAPControl needs to be able to grovel through this without an
      * an extra copy
      */
     friend class nsLDAPControl;
 
     uint8_t *mValue;    // pointer to an array
--- a/ldap/xpcom/src/nsLDAPConnection.h
+++ b/ldap/xpcom/src/nsLDAPConnection.h
@@ -47,19 +47,19 @@ class nsLDAPConnection : public nsILDAPC
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSILDAPCONNECTION
     NS_DECL_NSIDNSLISTENER
     NS_DECL_NSIOBSERVER
 
     // constructor & destructor
     //
     nsLDAPConnection();
-    virtual ~nsLDAPConnection();
 
   protected:
+    virtual ~nsLDAPConnection();
     // invoke the callback associated with a given message, and possibly
     // delete it from the connection queue
     //
     nsresult InvokeMessageCallback(LDAPMessage *aMsgHandle,
                                    nsILDAPMessage *aMsg,
                                    int32_t aOperation,
                                    bool aRemoveOpFromConnQ);
     /**
@@ -110,18 +110,20 @@ class nsLDAPConnectionRunnable : public 
 {
   friend class nsLDAPConnection;
   friend class nsLDAPMessage;
 
 public:
   nsLDAPConnectionRunnable(int32_t aOperationID,
                            nsILDAPOperation *aOperation,
                            nsLDAPConnection *aConnection);
-  virtual ~nsLDAPConnectionRunnable();
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIRUNNABLE
 
   int32_t mOperationID;
   nsRefPtr<nsLDAPConnection> mConnection;
+
+private:
+  virtual ~nsLDAPConnectionRunnable();
 };
 
 #endif // _nsLDAPConnection_h_
--- a/ldap/xpcom/src/nsLDAPControl.h
+++ b/ldap/xpcom/src/nsLDAPControl.h
@@ -10,17 +10,17 @@
 #include "nsStringGlue.h"
 #include "ldap.h"
 
 // {5B608BBE-C0EA-4f74-B209-9CDCD79EC401}
 #define NS_LDAPCONTROL_CID \
   { 0x5b608bbe, 0xc0ea, 0x4f74, \
       { 0xb2, 0x9, 0x9c, 0xdc, 0xd7, 0x9e, 0xc4, 0x1 } }
 
-class nsLDAPControl : public nsILDAPControl
+class nsLDAPControl MOZ_FINAL : public nsILDAPControl
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSILDAPCONTROL
 
   nsLDAPControl();
 
   /**
--- a/ldap/xpcom/src/nsLDAPMessage.h
+++ b/ldap/xpcom/src/nsLDAPMessage.h
@@ -28,19 +28,20 @@ class nsLDAPMessage : public nsILDAPMess
   public:
 
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSILDAPMESSAGE
 
     // constructor & destructor
     //
     nsLDAPMessage();
+
+  protected:
     virtual ~nsLDAPMessage();
 
-  protected:
     nsresult IterateAttrErrHandler(int32_t aLderrno, uint32_t *aAttrCount,
                             char** *aAttributes, BerElement *position);
     nsresult IterateAttributes(uint32_t *aAttrCount, char** *aAttributes,
                               bool getP);
     nsresult Init(nsILDAPConnection *aConnection,
                   LDAPMessage *aMsgHandle);
     LDAPMessage *mMsgHandle; // the message we're wrapping
     nsCOMPtr<nsILDAPOperation> mOperation;  // operation this msg relates to
--- a/ldap/xpcom/src/nsLDAPModification.h
+++ b/ldap/xpcom/src/nsLDAPModification.h
@@ -22,20 +22,21 @@ class nsLDAPModification : public nsILDA
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSILDAPMODIFICATION
 
   // constructor & destructor
   //
   nsLDAPModification();
-  virtual ~nsLDAPModification();
 
   nsresult Init();
 
 private:
+  virtual ~nsLDAPModification();
+
   int32_t mOperation;
   nsCString mType;
   nsCOMPtr<nsIMutableArray> mValues;
   mozilla::Mutex mValuesLock;
 };
 
 #endif // _nsLDAPModification_h_
--- a/ldap/xpcom/src/nsLDAPOperation.h
+++ b/ldap/xpcom/src/nsLDAPOperation.h
@@ -26,24 +26,25 @@ class nsLDAPOperation : public nsILDAPOp
   public:
 
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSILDAPOPERATION
 
     // constructor & destructor
     //
     nsLDAPOperation();
-    virtual ~nsLDAPOperation();
 
     /**
      * used to break cycles
      */
     void Clear();
 
   private:
+    virtual ~nsLDAPOperation();
+
     /**
      * wrapper for ldap_add_ext()
      *
      * XXX should move to idl, once LDAPControls have an IDL representation
      */
     nsresult AddExt(const char *base, // base DN to add
                     nsIArray *mods, // Array of modifications
                     LDAPControl **serverctrls,
--- a/ldap/xpcom/src/nsLDAPServer.h
+++ b/ldap/xpcom/src/nsLDAPServer.h
@@ -18,19 +18,20 @@ class nsLDAPServer : public nsILDAPServe
 {
   public:
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSILDAPSERVER
 
     // Constructor & destructor
     //
     nsLDAPServer();
+
+  protected:
     virtual ~nsLDAPServer();
 
-  protected:
     nsString mKey;          // Unique identifier for this server object
     nsCString mUsername;    // Username / UID
     nsCString mPassword;    // Password to bind with
     nsCString mBindDN;      // DN associated with the UID above
     uint32_t mSizeLimit;    // Limit the LDAP search to this # of entries
     uint32_t mProtocolVersion;  // What version of LDAP to use?
     // This "links" to a LDAP URL object, which holds further information
     // related to the LDAP server. Like Host, port, base-DN and scope.
--- a/ldap/xpcom/src/nsLDAPService.h
+++ b/ldap/xpcom/src/nsLDAPService.h
@@ -82,21 +82,21 @@ class nsLDAPService : public nsILDAPServ
     //
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSILDAPSERVICE
     NS_DECL_NSILDAPMESSAGELISTENER
 
     // constructor and destructor
     //
     nsLDAPService();
-    virtual ~nsLDAPService();
     
     nsresult Init();
 
   protected:
+    virtual ~nsLDAPService();
     nsresult EstablishConnection(nsLDAPServiceEntry *,
                                  nsILDAPMessageListener *);
 
     // kinda like strtok_r, but with iterators.  for use by 
     // createFilter
     //
     char *NextToken(const char **aIter, const char **aIterEnd);
 
--- a/ldap/xpcom/src/nsLDAPSyncQuery.h
+++ b/ldap/xpcom/src/nsLDAPSyncQuery.h
@@ -23,19 +23,19 @@ class nsLDAPSyncQuery : public nsILDAPSy
 {
   public:
 
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSILDAPMESSAGELISTENER
     NS_DECL_NSILDAPSYNCQUERY
 
     nsLDAPSyncQuery();
-    virtual ~nsLDAPSyncQuery();
 
   protected:
+    virtual ~nsLDAPSyncQuery();
 
     nsCOMPtr<nsILDAPConnection> mConnection; // connection used for search
     nsCOMPtr<nsILDAPOperation> mOperation;   // current ldap op
     nsCOMPtr<nsILDAPURL> mServerURL;         // LDAP URL
     bool mFinished;                        // control variable for eventQ
     nsString mResults;                       // values to return
     uint32_t mProtocolVersion;               // LDAP version to use
 
--- a/ldap/xpcom/src/nsLDAPURL.h
+++ b/ldap/xpcom/src/nsLDAPURL.h
@@ -32,19 +32,19 @@
 class nsLDAPURL : public nsILDAPURL
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIURI
   NS_DECL_NSILDAPURL
 
   nsLDAPURL();
-  virtual ~nsLDAPURL();
 
 protected:
+  virtual ~nsLDAPURL();
 
   void GetPathInternal(nsCString &aPath);
   nsresult SetPathInternal(const nsCString &aPath);
   nsresult SetAttributeArray(char** aAttributes);
 
   nsCString mDN;                // Base Distinguished Name (Base DN)
   int32_t mScope;               // Search scope (base, one or sub)
   nsCString mFilter;            // LDAP search filter
--- a/mail/components/migration/src/nsEudoraProfileMigrator.h
+++ b/mail/components/migration/src/nsEudoraProfileMigrator.h
@@ -24,16 +24,16 @@ class nsEudoraProfileMigrator : public n
                             public nsProfileMigratorBase
 {
 public:
   NS_DECL_NSIMAILPROFILEMIGRATOR
   NS_DECL_ISUPPORTS
   NS_DECL_NSITIMERCALLBACK
 
   nsEudoraProfileMigrator();
-  virtual ~nsEudoraProfileMigrator();
 
   virtual nsresult ContinueImport();
 
 private:
+  virtual ~nsEudoraProfileMigrator();
 };
 
 #endif
--- a/mail/components/migration/src/nsNetscapeProfileMigratorBase.h
+++ b/mail/components/migration/src/nsNetscapeProfileMigratorBase.h
@@ -35,17 +35,16 @@ class nsNetscapeProfileMigratorBase : pu
                                       public nsITimerCallback
 
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSITIMERCALLBACK
 
   nsNetscapeProfileMigratorBase();
-  virtual ~nsNetscapeProfileMigratorBase() { };
 
   NS_IMETHOD GetSourceHasMultipleProfiles(bool* aResult);
   NS_IMETHOD GetSourceExists(bool* aResult);
 
   struct PrefTransform;
   typedef nsresult(*prefConverter)(PrefTransform*, nsIPrefBranch*);
 
   struct PrefTransform {
@@ -78,16 +77,17 @@ public:
   static nsresult GetBool(PrefTransform* aTransform, nsIPrefBranch* aBranch);
   static nsresult SetBool(PrefTransform* aTransform, nsIPrefBranch* aBranch);
   static nsresult GetInt(PrefTransform* aTransform, nsIPrefBranch* aBranch);
   static nsresult SetInt(PrefTransform* aTransform, nsIPrefBranch* aBranch);
 
   nsresult RecursiveCopy(nsIFile* srcDir, nsIFile* destDir); // helper routine
 
 protected:
+  virtual ~nsNetscapeProfileMigratorBase() {}
   void CopyNextFolder();
   void EndCopyFolders();
 
   nsresult GetProfileDataFromProfilesIni(nsIFile* aDataDir,
                                          nsIMutableArray* aProfileNames,
                                          nsIMutableArray* aProfileLocations);
 
   nsresult CopyFile(const nsAString& aSourceFileName, const nsAString& aTargetFileName);
--- a/mail/components/migration/src/nsSeamonkeyProfileMigrator.h
+++ b/mail/components/migration/src/nsSeamonkeyProfileMigrator.h
@@ -14,26 +14,26 @@ class nsIPrefBranch;
 class nsIPrefService;
 
 class nsSeamonkeyProfileMigrator : public nsNetscapeProfileMigratorBase
 {
 public:
   NS_DECL_ISUPPORTS
 
   nsSeamonkeyProfileMigrator();
-  virtual ~nsSeamonkeyProfileMigrator();
 
   // nsIMailProfileMigrator methods
   NS_IMETHOD Migrate(uint16_t aItems, nsIProfileStartup* aStartup,
                         const char16_t* aProfile);
   NS_IMETHOD GetMigrateData(const char16_t* aProfile, bool aReplace,
                             uint16_t* aResult);
   NS_IMETHOD GetSourceProfiles(nsIArray** aResult);
 
 protected:
+  virtual ~nsSeamonkeyProfileMigrator();
   nsresult FillProfileDataFromSeamonkeyRegistry();
   nsresult GetSourceProfile(const char16_t* aProfile);
 
   nsresult CopyPreferences(bool aReplace);
   nsresult TransformPreferences(const nsAString& aSourcePrefFileName,
                                 const nsAString& aTargetPrefFileName);
 
   nsresult DummyCopyRoutine(bool aReplace);
--- a/mail/components/shell/DirectoryProvider.h
+++ b/mail/components/shell/DirectoryProvider.h
@@ -28,30 +28,30 @@ namespace mail {
 class DirectoryProvider : public nsIDirectoryServiceProvider2
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIDIRECTORYSERVICEPROVIDER
   NS_DECL_NSIDIRECTORYSERVICEPROVIDER2
 
   DirectoryProvider() {}
-  virtual ~DirectoryProvider() {}
 
 private:
+  virtual ~DirectoryProvider() {}
   class AppendingEnumerator : public nsISimpleEnumerator
   {
   public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSISIMPLEENUMERATOR
 
     AppendingEnumerator(nsISimpleEnumerator* aBase,
                         char const *const *aAppendList);
-    virtual ~AppendingEnumerator() {}
 
   private:
+    virtual ~AppendingEnumerator() {}
     nsCOMPtr<nsISimpleEnumerator> mBase;
     char const *const *const      mAppendList;
     nsCOMPtr<nsIFile>             mNext;
   };
 };
 
 } // namespace mail
 } // namespace mozilla
--- a/mailnews/addrbook/src/nsAbAddressCollector.h
+++ b/mailnews/addrbook/src/nsAbAddressCollector.h
@@ -15,25 +15,25 @@
 
 class nsIPrefBranch;
 
 class nsAbAddressCollector : public nsIAbAddressCollector,
                              public nsIObserver
 {
 public:
   nsAbAddressCollector();
-  virtual ~nsAbAddressCollector();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIABADDRESSCOLLECTOR
   NS_DECL_NSIOBSERVER
 
   nsresult Init();
 
 private:
+  virtual ~nsAbAddressCollector();
   already_AddRefed<nsIAbCard> GetCardForAddress(const nsACString &aEmailAddress,
                                                 nsIAbDirectory **aDirectory);
   void AutoCollectScreenName(nsIAbCard *aCard, const nsACString &aEmail);
   bool SetNamesForCard(nsIAbCard *aSenderCard, const nsACString &aFullName);
   void SplitFullName(const nsCString &aFullName, nsCString &aFirstName,
                      nsCString &aLastName);
   void SetUpAbFromPrefs(nsIPrefBranch *aPrefBranch);
   nsCOMPtr <nsIAbDirectory> mDirectory;
--- a/mailnews/addrbook/src/nsAbBooleanExpression.h
+++ b/mailnews/addrbook/src/nsAbBooleanExpression.h
@@ -13,31 +13,31 @@
 
 class nsAbBooleanConditionString : public nsIAbBooleanConditionString
 {
 public:
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSIABBOOLEANCONDITIONSTRING
 
     nsAbBooleanConditionString();
-    virtual ~nsAbBooleanConditionString();
 
 protected:
+    virtual ~nsAbBooleanConditionString();
     nsAbBooleanConditionType mCondition;
     nsCString mName;
     nsString mValue;
 };
 
 class nsAbBooleanExpression: public nsIAbBooleanExpression
 {
 public:
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSIABBOOLEANEXPRESSION
 
     nsAbBooleanExpression();
-    virtual ~nsAbBooleanExpression();
 
 protected:
+    virtual ~nsAbBooleanExpression();
     nsAbBooleanOperationType mOperation;
     nsCOMPtr<nsIArray> mExpressions;
 };
 
 #endif
--- a/mailnews/addrbook/src/nsAbCardProperty.cpp
+++ b/mailnews/addrbook/src/nsAbCardProperty.cpp
@@ -195,26 +195,27 @@ NS_IMETHODIMP nsAbCardProperty::SetMailL
   else
     return NS_ERROR_NULL_POINTER;
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 // Property bag portion of nsAbCardProperty
 ///////////////////////////////////////////////////////////////////////////////
 
-class nsAbSimpleProperty : public nsIProperty {
+class nsAbSimpleProperty MOZ_FINAL : public nsIProperty {
 public:
     nsAbSimpleProperty(const nsACString& aName, nsIVariant* aValue)
         : mName(aName), mValue(aValue)
     {
     }
 
     NS_DECL_ISUPPORTS
     NS_DECL_NSIPROPERTY
 protected:
+    ~nsAbSimpleProperty() {}
     nsCString mName;
     nsCOMPtr<nsIVariant> mValue;
 };
 
 NS_IMPL_ISUPPORTS(nsAbSimpleProperty, nsIProperty)
 
 NS_IMETHODIMP
 nsAbSimpleProperty::GetName(nsAString& aName)
--- a/mailnews/addrbook/src/nsAbCardProperty.h
+++ b/mailnews/addrbook/src/nsAbCardProperty.h
@@ -30,19 +30,19 @@ struct AppendItem;
 class nsAbCardProperty: public nsIAbCard
 {
 public: 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIABCARD
   NS_DECL_NSIABITEM
 
   nsAbCardProperty();
-  virtual ~nsAbCardProperty(void);
 
 protected:
+  virtual ~nsAbCardProperty();
 	bool     m_IsMailList;
 	nsCString m_MailListURI;
 
   // Store most of the properties here
   nsInterfaceHashtable<nsCStringHashKey, nsIVariant> m_properties;
 
   nsCString m_directoryId, m_localId;
 private:
--- a/mailnews/addrbook/src/nsAbContentHandler.h
+++ b/mailnews/addrbook/src/nsAbContentHandler.h
@@ -9,16 +9,18 @@
 #include "nsIStreamLoader.h"
 #include "nsIContentHandler.h"
 
 class nsAbContentHandler : public nsIContentHandler,
                            public nsIStreamLoaderObserver
 {
 public:
   nsAbContentHandler();
-  virtual ~nsAbContentHandler();
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSICONTENTHANDLER
   NS_DECL_NSISTREAMLOADEROBSERVER
+
+private:
+  virtual ~nsAbContentHandler();
 };
 
 #endif
--- a/mailnews/addrbook/src/nsAbDirFactoryService.h
+++ b/mailnews/addrbook/src/nsAbDirFactoryService.h
@@ -10,12 +10,14 @@
 
 class nsAbDirFactoryService : public nsIAbDirFactoryService
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIABDIRFACTORYSERVICE
 
   nsAbDirFactoryService();
+
+private:
   virtual ~nsAbDirFactoryService();
 };
 
 #endif
--- a/mailnews/addrbook/src/nsAbDirProperty.h
+++ b/mailnews/addrbook/src/nsAbDirProperty.h
@@ -26,24 +26,25 @@
   * Address Book Directory
   */ 
 
 class nsAbDirProperty: public nsIAbDirectory,
                        public nsSupportsWeakReference
 {
 public: 
 	nsAbDirProperty(void);
-	virtual ~nsAbDirProperty(void);
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIABITEM
   NS_DECL_NSIABCOLLECTION
   NS_DECL_NSIABDIRECTORY
 
 protected:
+	virtual ~nsAbDirProperty(void);
+
   /**
    * Initialise the directory prefs for this branch
    */
   nsresult InitDirectoryPrefs();
 
 	uint32_t m_LastModifiedDate;
 
 	nsString m_ListDirName;
--- a/mailnews/addrbook/src/nsAbDirectoryQuery.h
+++ b/mailnews/addrbook/src/nsAbDirectoryQuery.h
@@ -15,31 +15,35 @@
 
 class nsAbDirectoryQuerySimpleBooleanExpression : public nsIAbBooleanExpression
 {
 public:
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSIABBOOLEANEXPRESSION
 
     nsAbDirectoryQuerySimpleBooleanExpression();
+
+private:
     virtual ~nsAbDirectoryQuerySimpleBooleanExpression();
 
 public:
     nsCOMPtr<nsIArray> mExpressions;
     nsAbBooleanOperationType mOperation;
 };
 
 
 class nsAbDirectoryQueryArguments : public nsIAbDirectoryQueryArguments
 {
 public:
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSIABDIRECTORYQUERYARGUMENTS
 
     nsAbDirectoryQueryArguments();
+
+private:
     virtual ~nsAbDirectoryQueryArguments();
 
 protected:
     nsCOMPtr<nsISupports> mExpression;
     nsCOMPtr<nsISupports> mTypeSpecificArg;
     bool mQuerySubDirectories;
     nsCString mFilter;
 };
@@ -51,35 +55,35 @@ public:
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSIABDIRECTORYQUERYPROPERTYVALUE
 
     nsAbDirectoryQueryPropertyValue();
     nsAbDirectoryQueryPropertyValue(const char* aName,
           const char16_t* aValue);
     nsAbDirectoryQueryPropertyValue(const char* aName,
           nsISupports* aValueISupports);
-    virtual ~nsAbDirectoryQueryPropertyValue();
 
 protected:
+    virtual ~nsAbDirectoryQueryPropertyValue();
     nsCString mName;
     nsString mValue;
     nsCOMPtr<nsISupports> mValueISupports;
 };
 
 
 class nsAbDirectoryQuery : public nsIAbDirectoryQuery
 {
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIABDIRECTORYQUERY
 
     nsAbDirectoryQuery();
-    virtual ~nsAbDirectoryQuery();
 
 protected:
+    virtual ~nsAbDirectoryQuery();
     nsresult query(nsIAbDirectory* directory,
                    nsIAbBooleanExpression* expression,
                    nsIAbDirSearchListener* listener,
                    bool doSubDirectories,
                    int32_t* resultLimit);
     nsresult queryChildren(nsIAbDirectory* directory,
                            nsIAbBooleanExpression* expression,
                            nsIAbDirSearchListener* listener,
--- a/mailnews/addrbook/src/nsAbDirectoryQueryProxy.h
+++ b/mailnews/addrbook/src/nsAbDirectoryQueryProxy.h
@@ -12,16 +12,16 @@
 class nsAbDirectoryQueryProxy : public nsIAbDirectoryQueryProxy
 {
 public:
     NS_DECL_ISUPPORTS
     NS_FORWARD_NSIABDIRECTORYQUERY(mDirectoryQuery->)
     NS_DECL_NSIABDIRECTORYQUERYPROXY
 
     nsAbDirectoryQueryProxy();
-    virtual ~nsAbDirectoryQueryProxy();
 
 protected:
+    virtual ~nsAbDirectoryQueryProxy();
     bool mInitiated;
     nsCOMPtr<nsIAbDirectoryQuery> mDirectoryQuery;
 };
 
 #endif
--- a/mailnews/addrbook/src/nsAbLDAPCard.h
+++ b/mailnews/addrbook/src/nsAbLDAPCard.h
@@ -15,16 +15,16 @@ class nsIMutableArray;
 class nsAbLDAPCard : public nsAbCardProperty,
                      public nsIAbLDAPCard
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIABLDAPCARD
 
   nsAbLDAPCard();
-  virtual ~nsAbLDAPCard();
 
 protected:
+  virtual ~nsAbLDAPCard();
   nsTArray<nsCString> m_attributes;
   nsTArray<nsCString> m_objectClass;
 };
 
 #endif
--- a/mailnews/addrbook/src/nsAbLDAPChangeLogData.h
+++ b/mailnews/addrbook/src/nsAbLDAPChangeLogData.h
@@ -17,21 +17,21 @@ typedef struct {
   nsCString     dataVersion;
 } RootDSEChangeLogEntry;
 
 class nsAbLDAPProcessChangeLogData : public nsAbLDAPProcessReplicationData
 {
 public :
    
   nsAbLDAPProcessChangeLogData();
-  ~nsAbLDAPProcessChangeLogData();
 
   NS_IMETHOD Init(nsIAbLDAPReplicationQuery * query, nsIWebProgressListener *progressListener);
 
 protected :
+  ~nsAbLDAPProcessChangeLogData();
 
   nsCOMPtr <nsIAbLDAPChangeLogQuery> mChangeLogQuery;
 
   nsresult OnLDAPBind(nsILDAPMessage *aMessage);
   nsresult OnLDAPSearchEntry(nsILDAPMessage *aMessage) MOZ_OVERRIDE;
   nsresult OnLDAPSearchResult(nsILDAPMessage *aMessage) MOZ_OVERRIDE;
 
   nsresult ParseChangeLogEntries(nsILDAPMessage *aMessage);
--- a/mailnews/addrbook/src/nsAbLDAPDirFactory.h
+++ b/mailnews/addrbook/src/nsAbLDAPDirFactory.h
@@ -10,12 +10,14 @@
 
 class nsAbLDAPDirFactory : public nsIAbDirFactory
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIABDIRFACTORY
 
   nsAbLDAPDirFactory();
+
+private:
   virtual ~nsAbLDAPDirFactory();
 };
 
 #endif
--- a/mailnews/addrbook/src/nsAbLDAPDirectoryModify.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPDirectoryModify.cpp
@@ -29,22 +29,22 @@ public:
                                 const nsACString &newRDN,
                                 const nsACString &newBaseDN,
                                 nsILDAPURL* directoryUrl,
                                 nsILDAPConnection* connection,
                                 nsIMutableArray* serverSearchControls,
                                 nsIMutableArray* clientSearchControls,
                                 const nsACString &login,
                                 const int32_t timeOut = 0);
-  virtual ~nsAbModifyLDAPMessageListener();
-
   // nsILDAPMessageListener
   NS_IMETHOD OnLDAPMessage(nsILDAPMessage *aMessage);
 
 protected:
+  virtual ~nsAbModifyLDAPMessageListener();
+
   nsresult Cancel();
   virtual void InitFailed(bool aCancelled = false);
   virtual nsresult DoTask();
   nsresult DoMainTask();
   nsresult OnLDAPMessageModifyResult(nsILDAPMessage *aMessage);
   nsresult OnLDAPMessageRenameResult(nsILDAPMessage *aMessage);
 
   int32_t mType;
--- a/mailnews/addrbook/src/nsAbLDAPDirectoryQuery.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPDirectoryQuery.cpp
@@ -39,22 +39,22 @@ public:
                                nsILDAPConnection* connection,
                                nsIAbDirectoryQueryArguments* queryArguments,
                                nsIMutableArray* serverSearchControls,
                                nsIMutableArray* clientSearchControls,
                                const nsACString &login,
                                const nsACString &mechanism,
                                const int32_t resultLimit = -1,
                                const int32_t timeOut = 0);
-  virtual ~nsAbQueryLDAPMessageListener ();
 
   // nsILDAPMessageListener
   NS_IMETHOD OnLDAPMessage(nsILDAPMessage *aMessage);
 
 protected:
+  virtual ~nsAbQueryLDAPMessageListener ();
   nsresult OnLDAPMessageSearchEntry(nsILDAPMessage *aMessage);
   nsresult OnLDAPMessageSearchResult(nsILDAPMessage *aMessage);
 
   friend class nsAbLDAPDirectoryQuery;
 
   nsresult Cancel();
   virtual nsresult DoTask();
   virtual void InitFailed(bool aCancelled = false);
--- a/mailnews/addrbook/src/nsAbLDAPDirectoryQuery.h
+++ b/mailnews/addrbook/src/nsAbLDAPDirectoryQuery.h
@@ -19,22 +19,22 @@ class nsAbLDAPDirectoryQuery : public ns
                              public nsIAbDirectoryQueryResultListener
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIABDIRECTORYQUERY
   NS_DECL_NSIABDIRECTORYQUERYRESULTLISTENER
 
   nsAbLDAPDirectoryQuery();
-  virtual ~nsAbLDAPDirectoryQuery();
 
 protected:
   nsCOMPtr<nsILDAPMessageListener> mListener;
 
 private:
+  virtual ~nsAbLDAPDirectoryQuery();
   nsCOMPtr<nsILDAPConnection> mConnection;
   nsCOMPtr<nsILDAPURL> mDirectoryUrl;
   nsCString mDirectoryId;
   nsCOMArray<nsIAbDirSearchListener> mListeners;
   nsCString mCurrentLogin;
   nsCString mCurrentMechanism;
   uint32_t mCurrentProtocolVersion;
 
--- a/mailnews/addrbook/src/nsAbLDAPReplicationData.h
+++ b/mailnews/addrbook/src/nsAbLDAPReplicationData.h
@@ -21,22 +21,22 @@
 class nsAbLDAPProcessReplicationData : public nsIAbLDAPProcessReplicationData,
                                        public nsAbLDAPListenerBase
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIABLDAPPROCESSREPLICATIONDATA
 
   nsAbLDAPProcessReplicationData();
-  virtual ~nsAbLDAPProcessReplicationData();
 
   // nsILDAPMessageListener
   NS_IMETHOD OnLDAPMessage(nsILDAPMessage *aMessage) MOZ_OVERRIDE;
 
 protected:
+  virtual ~nsAbLDAPProcessReplicationData();
   virtual nsresult DoTask() MOZ_OVERRIDE;
   virtual void InitFailed(bool aCancelled = false) MOZ_OVERRIDE;
 
   // pointer to the interfaces used by this object
   nsCOMPtr<nsIWebProgressListener> mListener;
   // pointer to the query to call back to once we've finished
   nsCOMPtr<nsIAbLDAPReplicationQuery> mQuery;
 
--- a/mailnews/addrbook/src/nsAbLDAPReplicationQuery.h
+++ b/mailnews/addrbook/src/nsAbLDAPReplicationQuery.h
@@ -11,28 +11,29 @@
 #include "nsIAbLDAPReplicationData.h"
 #include "nsIAbLDAPDirectory.h"
 #include "nsILDAPConnection.h"
 #include "nsILDAPOperation.h"
 #include "nsILDAPURL.h"
 #include "nsDirPrefs.h"
 #include "nsStringGlue.h"
 
-class nsAbLDAPReplicationQuery : public nsIAbLDAPReplicationQuery
+class nsAbLDAPReplicationQuery MOZ_FINAL : public nsIAbLDAPReplicationQuery
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIABLDAPREPLICATIONQUERY
 
   nsAbLDAPReplicationQuery();
 
   nsresult InitLDAPData();
   nsresult ConnectToLDAPServer();
 
 protected :
+  ~nsAbLDAPReplicationQuery() {}
   // pointer to interfaces used by this object
   nsCOMPtr<nsILDAPConnection> mConnection;
   nsCOMPtr<nsILDAPOperation> mOperation;
   nsCOMPtr<nsILDAPURL> mURL;
   nsCOMPtr<nsIAbLDAPDirectory> mDirectory;
 
   nsCOMPtr<nsIAbLDAPProcessReplicationData> mDataProcessor;
 
--- a/mailnews/addrbook/src/nsAbLDAPReplicationService.h
+++ b/mailnews/addrbook/src/nsAbLDAPReplicationService.h
@@ -13,21 +13,21 @@
 
 class nsAbLDAPReplicationService : public nsIAbLDAPReplicationService
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIABLDAPREPLICATIONSERVICE
 
   nsAbLDAPReplicationService();
-  virtual ~nsAbLDAPReplicationService();
 
   int32_t DecideProtocol();
 
 protected:
+  virtual ~nsAbLDAPReplicationService();
   nsCOMPtr<nsIAbLDAPReplicationQuery> mQuery; 
   bool           mReplicating;
   nsCOMPtr<nsIAbLDAPDirectory> mDirectory;
 
 };
 
 
 #endif /* nsAbLDAPReplicationService_h___ */
--- a/mailnews/addrbook/src/nsAbLDIFService.h
+++ b/mailnews/addrbook/src/nsAbLDIFService.h
@@ -12,18 +12,18 @@ class nsIMdbRow;
 
 class nsAbLDIFService : public nsIAbLDIFService
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIABLDIFSERVICE
 
   nsAbLDIFService();
+private:
   virtual ~nsAbLDIFService();
-private:
   nsresult        str_parse_line(char *line, char **type, char **value, int *vlen) const;
   char *          str_getline(char **next) const;
   nsresult        GetLdifStringRecord(char* buf, int32_t len, int32_t& stopPos);
   void AddLdifRowToDatabase(nsIAddrDatabase *aDatabase, bool aIsList);
   void AddLdifColToDatabase(nsIAddrDatabase *aDatabase, nsIMdbRow* newRow,
                             char* typeSlot, char* valueSlot, bool bIsList);
   void            ClearLdifRecordBuffer();
   void            SplitCRLFAddressField(nsCString &inputAddress, nsCString &outputLine1, nsCString &outputLine2) const;
--- a/mailnews/addrbook/src/nsAbMDBDirFactory.h
+++ b/mailnews/addrbook/src/nsAbMDBDirFactory.h
@@ -10,13 +10,15 @@
 
 class nsAbMDBDirFactory : public nsIAbDirFactory
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIABDIRFACTORY
 
   nsAbMDBDirFactory();
+
+private:
   virtual ~nsAbMDBDirFactory();
 };
 
 
 #endif
--- a/mailnews/addrbook/src/nsAbManager.h
+++ b/mailnews/addrbook/src/nsAbManager.h
@@ -19,26 +19,26 @@ class nsIAbLDAPAttributeMap;
 
 class nsAbManager : public nsIAbManager,
                     public nsICommandLineHandler,
                     public nsIObserver
 {
   
 public:
 	nsAbManager();
-	virtual ~nsAbManager();
 
 	NS_DECL_THREADSAFE_ISUPPORTS
  	NS_DECL_NSIABMANAGER
   NS_DECL_NSIOBSERVER
   NS_DECL_NSICOMMANDLINEHANDLER
 
   nsresult Init();
 
 private:
+	virtual ~nsAbManager();
   nsresult GetRootDirectory(nsIAbDirectory **aResult);
   nsresult ExportDirectoryToDelimitedText(nsIAbDirectory *aDirectory, const char *aDelim, uint32_t aDelimLen, nsIFile *aLocalFile);
   nsresult ExportDirectoryToLDIF(nsIAbDirectory *aDirectory, nsIFile *aLocalFile);
   nsresult AppendLDIFForMailList(nsIAbCard *aCard, nsIAbLDAPAttributeMap *aAttrMap, nsACString &aResult);
   nsresult AppendDNForCard(const char *aProperty, nsIAbCard *aCard, nsIAbLDAPAttributeMap *aAttrMap, nsACString &aResult);
   nsresult AppendBasicLDIFForCard(nsIAbCard *aCard, nsIAbLDAPAttributeMap *aAttrMap, nsACString &aResult);
   nsresult AppendProperty(const char *aProperty, const char16_t *aValue, nsACString &aResult);
   bool IsSafeLDIFString(const char16_t *aStr);
--- a/mailnews/addrbook/src/nsAbOSXCard.h
+++ b/mailnews/addrbook/src/nsAbOSXCard.h
@@ -36,11 +36,12 @@ public:
   nsresult Update(bool aNotify) MOZ_OVERRIDE;
   nsresult GetURI(nsACString &aURI) MOZ_OVERRIDE;
   nsresult Init(const char *aUri) MOZ_OVERRIDE;
   // this is needed so nsAbOSXUtils.mm can get at nsAbCardProperty
   friend class nsAbOSXUtils;
 private:
   nsCString mURI;
 
+  virtual ~nsAbOSXCard() {}
 };
 
 #endif // nsAbOSXCard_h___
--- a/mailnews/addrbook/src/nsAbOSXDirFactory.h
+++ b/mailnews/addrbook/src/nsAbOSXDirFactory.h
@@ -3,16 +3,19 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsAbOSXDirFactory_h___
 #define nsAbOSXDirFactory_h___
 
 #include "nsIAbDirFactory.h"
 
-class nsAbOSXDirFactory : public nsIAbDirFactory
+class nsAbOSXDirFactory MOZ_FINAL : public nsIAbDirFactory
 {
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIABDIRFACTORY
+
+private:
+    ~nsAbOSXDirFactory() {}
 };
 
 #endif // nsAbOSXDirFactory_h___
--- a/mailnews/addrbook/src/nsAbView.h
+++ b/mailnews/addrbook/src/nsAbView.h
@@ -32,27 +32,27 @@ typedef struct AbCard
   uint8_t *secondaryCollationKey;
 } AbCard;
 
 
 class nsAbView : public nsIAbView, public nsITreeView, public nsIAbListener, public nsIObserver
 {
 public:
   nsAbView();
-  virtual ~nsAbView();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIABVIEW
   NS_DECL_NSITREEVIEW
   NS_DECL_NSIABLISTENER
   NS_DECL_NSIOBSERVER
   
   int32_t CompareCollationKeys(uint8_t *key1, uint32_t len1, uint8_t *key2, uint32_t len2);
 
 private:
+  virtual ~nsAbView();
   nsresult Initialize();
   int32_t FindIndexForInsert(AbCard *abcard);
   int32_t FindIndexForCard(nsIAbCard *card);
   nsresult GenerateCollationKeysForCard(const char16_t *colID, AbCard *abcard);
   nsresult InvalidateTree(int32_t row);
   nsresult RemoveCardAt(int32_t row);
   nsresult AddCard(AbCard *abcard, bool selectCardAfterAdding, int32_t *index);
   nsresult RemoveCardAndSelectNextCard(nsISupports *item);
--- a/mailnews/addrbook/src/nsAddbookProtocolHandler.h
+++ b/mailnews/addrbook/src/nsAddbookProtocolHandler.h
@@ -12,26 +12,26 @@
 #include "nsIProtocolHandler.h"
 #include "nsIAddbookUrl.h"
 #include "nsIAddrDatabase.h"
 
 class nsAddbookProtocolHandler : public nsIProtocolHandler
 {
 public:
 	nsAddbookProtocolHandler();
-	virtual ~nsAddbookProtocolHandler();
 
   NS_DECL_ISUPPORTS
 
   //////////////////////////////////////////////////////////////////////////
   // We support the nsIProtocolHandler interface.
   //////////////////////////////////////////////////////////////////////////
   NS_DECL_NSIPROTOCOLHANDLER
 
 private:
+	virtual ~nsAddbookProtocolHandler();
   nsresult    GenerateXMLOutputChannel(nsString &aOutput,
                                          nsIAddbookUrl *addbookUrl,
                                          nsIURI *aURI, 
                                          nsIChannel **_retval);
 
   nsresult    GeneratePrintOutput(nsIAddbookUrl *addbookUrl, 
                                    nsString &aOutput);
 
--- a/mailnews/addrbook/src/nsAddbookUrl.h
+++ b/mailnews/addrbook/src/nsAddbookUrl.h
@@ -13,18 +13,18 @@
 class nsAddbookUrl : public nsIAddbookUrl
 {
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIURI
     NS_DECL_NSIADDBOOKURL
 
     nsAddbookUrl();
-    virtual ~nsAddbookUrl();
 
 protected:
+  virtual ~nsAddbookUrl();
   nsresult                      ParseUrl();         
   int32_t                       mOperationType;     // the internal ID for the operation
 
   nsCOMPtr<nsIURI>              m_baseURL;          // the base URL for the object
 };
 
 #endif // nsAddbookUrl_h__
--- a/mailnews/addrbook/src/nsAddrDatabase.cpp
+++ b/mailnews/addrbook/src/nsAddrDatabase.cpp
@@ -2506,19 +2506,19 @@ public:
     NS_DECL_ISUPPORTS
 
     // nsISimpleEnumerator methods:
     NS_DECL_NSISIMPLEENUMERATOR
     NS_DECL_NSIADDRDBLISTENER
     // nsAddrDBEnumerator methods:
 
     nsAddrDBEnumerator(nsAddrDatabase* aDb);
-    virtual ~nsAddrDBEnumerator();
     void Clear();
 protected:
+    virtual ~nsAddrDBEnumerator();
     nsRefPtr<nsAddrDatabase> mDb;
     nsIMdbTable *mDbTable;
     nsCOMPtr<nsIMdbTableRowCursor> mRowCursor;
     nsCOMPtr<nsIMdbRow> mCurrentRow;
     mdb_pos mRowPos;
 };
 
 nsAddrDBEnumerator::nsAddrDBEnumerator(nsAddrDatabase* aDb)
@@ -2661,29 +2661,30 @@ NS_IMETHODIMP nsAddrDBEnumerator::OnList
 
 /* void onAnnouncerGoingAway (); */
 NS_IMETHODIMP nsAddrDBEnumerator::OnAnnouncerGoingAway()
 {
   Clear();
   return NS_OK;
 }
 
-class nsListAddressEnumerator : public nsISimpleEnumerator
+class nsListAddressEnumerator MOZ_FINAL : public nsISimpleEnumerator
 {
 public:
     NS_DECL_ISUPPORTS
 
     // nsISimpleEnumerator methods:
     NS_DECL_NSISIMPLEENUMERATOR
 
     // nsListAddressEnumerator methods:
 
     nsListAddressEnumerator(nsAddrDatabase* aDb, mdb_id aRowID);
 
 protected:
+    ~nsListAddressEnumerator() {}
     nsRefPtr<nsAddrDatabase> mDb;
     nsIMdbTable *mDbTable;
     nsCOMPtr<nsIMdbRow> mListRow;
     mdb_id mListRowID;
     uint32_t mAddressTotal;
     uint16_t mAddressPos;
 };
 
--- a/mailnews/addrbook/src/nsAddrDatabase.h
+++ b/mailnews/addrbook/src/nsAddrDatabase.h
@@ -242,17 +242,16 @@ public:
 
   NS_IMETHOD GetCardCount(uint32_t *count) MOZ_OVERRIDE;
 
   NS_IMETHOD SetCardValue(nsIAbCard *card, const char *name, const char16_t *value, bool notify) MOZ_OVERRIDE;
   NS_IMETHOD GetCardValue(nsIAbCard *card, const char *name, char16_t **value) MOZ_OVERRIDE;
   // nsAddrDatabase methods:
 
   nsAddrDatabase();
-  virtual ~nsAddrDatabase();
 
   void GetMDBFactory(nsIMdbFactory ** aMdbFactory);
   nsIMdbEnv    *GetEnv() {return m_mdbEnv;}
   uint32_t    GetCurVersion();
   nsIMdbTableRowCursor *GetTableRowCursor();
   nsIMdbTable    *GetPabTable() {return m_mdbPabTable;}
 
   static nsAddrDatabase* FindInCache(nsIFile *dbName);
@@ -273,16 +272,17 @@ public:
   nsresult GetAddressRowByPos(nsIMdbRow* listRow, uint16_t pos, nsIMdbRow** cardRow);
 
     NS_IMETHOD AddListCardColumnsToRow(nsIAbCard *aPCard, nsIMdbRow *aPListRow, uint32_t aPos, nsIAbCard** aPNewCard, bool aInMailingList, nsIAbDirectory *aParent, nsIAbDirectory *aRoot) MOZ_OVERRIDE;
     NS_IMETHOD InitCardFromRow(nsIAbCard *aNewCard, nsIMdbRow* aCardRow) MOZ_OVERRIDE;
     NS_IMETHOD SetListAddressTotal(nsIMdbRow* aListRow, uint32_t aTotal) MOZ_OVERRIDE;
     NS_IMETHOD FindRowByCard(nsIAbCard * card,nsIMdbRow **aRow) MOZ_OVERRIDE;
 
 protected:
+  virtual ~nsAddrDatabase();
 
   static void RemoveFromCache(nsAddrDatabase* pAddrDB);
   bool MatchDbName(nsIFile *dbName); // returns TRUE if they match
 
   void YarnToUInt32(struct mdbYarn *yarn, uint32_t *pResult);
   void GetCharStringYarn(char* str, struct mdbYarn* strYarn);
   void GetStringYarn(const nsAString & aStr, struct mdbYarn* strYarn);
   void GetIntYarn(uint32_t nValue, struct mdbYarn* intYarn);
--- a/mailnews/addrbook/src/nsDirPrefs.cpp
+++ b/mailnews/addrbook/src/nsDirPrefs.cpp
@@ -68,22 +68,25 @@ static nsresult DIR_GetServerPreferences
 static void DIR_SaveServerPreferences(nsVoidArray *wholeList);
 
 static int32_t dir_UserId = 0;
 nsVoidArray *dir_ServerList = nullptr;
 
 /*****************************************************************************
  * Functions for creating the new back end managed DIR_Server list.
  */
-class DirPrefObserver : public nsSupportsWeakReference,
-                        public nsIObserver
+class DirPrefObserver MOZ_FINAL : public nsSupportsWeakReference,
+                                  public nsIObserver
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIOBSERVER
+
+private:
+  ~DirPrefObserver() {}
 };
 
 NS_IMPL_ISUPPORTS(DirPrefObserver, nsISupportsWeakReference, nsIObserver)
 
 NS_IMETHODIMP DirPrefObserver::Observe(nsISupports *aSubject, const char *aTopic, const char16_t *aData)
 {
   nsCOMPtr<nsIPrefBranch> prefBranch(do_QueryInterface(aSubject));
   nsCString strPrefName;
--- a/mailnews/addrbook/src/nsMsgVCardService.h
+++ b/mailnews/addrbook/src/nsMsgVCardService.h
@@ -11,12 +11,14 @@
 
 class nsMsgVCardService : public nsIMsgVCardService
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGVCARDSERVICE
 
   nsMsgVCardService();
+
+private:
   virtual ~nsMsgVCardService();
 };
 
 #endif /* nsMsgVCardService_h___ */
--- a/mailnews/base/src/MailNewsDLF.h
+++ b/mailnews/base/src/MailNewsDLF.h
@@ -17,20 +17,22 @@ namespace mailnews {
  * This factory is a thin wrapper around the text/html loader factory. All it
  * does is convert message/rfc822 to text/html and delegate the rest of the
  * work to the text/html factory.
  */
 class MailNewsDLF : public nsIDocumentLoaderFactory
 {
 public:
   MailNewsDLF();
-  virtual ~MailNewsDLF();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIDOCUMENTLOADERFACTORY
+
+private:
+  virtual ~MailNewsDLF();
 };
 }
 }
 
 #define MAILNEWSDLF_CATEGORIES \
   { "Gecko-Content-Viewers", MESSAGE_RFC822, NS_MAILNEWSDLF_CONTRACTID }, \
 
 #endif
--- a/mailnews/base/src/nsCidProtocolHandler.h
+++ b/mailnews/base/src/nsCidProtocolHandler.h
@@ -8,15 +8,17 @@
 
 #include "nsCOMPtr.h"
 #include "nsIProtocolHandler.h"
 
 class nsCidProtocolHandler : public nsIProtocolHandler
 {
 public:
   nsCidProtocolHandler();
-  virtual ~nsCidProtocolHandler();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIPROTOCOLHANDLER
+
+private:
+  virtual ~nsCidProtocolHandler();
 };
 
 #endif /* nsCidProtocolHandler_h__ */
--- a/mailnews/base/src/nsCopyMessageStreamListener.h
+++ b/mailnews/base/src/nsCopyMessageStreamListener.h
@@ -12,24 +12,25 @@
 #include "nsICopyMessageListener.h"
 #include "nsCOMPtr.h"
 #include "nsIURI.h"
 
 class nsCopyMessageStreamListener : public nsIStreamListener, public nsICopyMessageStreamListener {
 
 public:
 	nsCopyMessageStreamListener();
-	virtual ~nsCopyMessageStreamListener();
 
 	NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSICOPYMESSAGESTREAMLISTENER
     NS_DECL_NSIREQUESTOBSERVER
     NS_DECL_NSISTREAMLISTENER
 
 protected:
+	virtual ~nsCopyMessageStreamListener();
+
 	nsCOMPtr<nsICopyMessageListener> mDestination;
 	nsCOMPtr<nsISupports> mListenerData;
 	nsCOMPtr<nsIMsgFolder> mSrcFolder;
 
 };
 
 
 
--- a/mailnews/base/src/nsMailDirProvider.h
+++ b/mailnews/base/src/nsMailDirProvider.h
@@ -6,35 +6,38 @@
 #ifndef nsMailDirProvider_h__
 #define nsMailDirProvider_h__
 
 #include "nsIDirectoryService.h"
 #include "nsISimpleEnumerator.h"
 #include "nsStringGlue.h"
 #include "nsCOMPtr.h"
 
-class nsMailDirProvider : public nsIDirectoryServiceProvider2
+class nsMailDirProvider MOZ_FINAL : public nsIDirectoryServiceProvider2
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIDIRECTORYSERVICEPROVIDER
   NS_DECL_NSIDIRECTORYSERVICEPROVIDER2
 
 private:
+  ~nsMailDirProvider() {}
+
   nsresult EnsureDirectory(nsIFile *aDirectory);
 
-  class AppendingEnumerator : public nsISimpleEnumerator
+  class AppendingEnumerator MOZ_FINAL : public nsISimpleEnumerator
   {
   public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSISIMPLEENUMERATOR
 
     AppendingEnumerator(nsISimpleEnumerator* aBase);
 
   private:
+    ~AppendingEnumerator() {}
     nsCOMPtr<nsISimpleEnumerator> mBase;
     nsCOMPtr<nsIFile>             mNext;
     nsCOMPtr<nsIFile>             mNextWithLocale;
     nsCString                     mLocale;
   };
 };
 
 #endif // nsMailDirProvider_h__
--- a/mailnews/base/src/nsMessenger.cpp
+++ b/mailnews/base/src/nsMessenger.cpp
@@ -135,17 +135,16 @@ class nsSaveAllAttachmentsState;
 
 class nsSaveMsgListener : public nsIUrlListener,
                           public nsIMsgCopyServiceListener,
                           public nsIStreamListener,
                           public nsICancelable
 {
 public:
   nsSaveMsgListener(nsIFile *file, nsMessenger *aMessenger, nsIUrlListener *aListener);
-  virtual ~nsSaveMsgListener();
 
   NS_DECL_ISUPPORTS
 
   NS_DECL_NSIURLLISTENER
   NS_DECL_NSIMSGCOPYSERVICELISTENER
   NS_DECL_NSISTREAMLISTENER
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSICANCELABLE
@@ -175,16 +174,19 @@ public:
   nsCOMPtr<nsIURI> mListenerUri;
   int64_t mProgress;
   int64_t mMaxProgress;
   bool    mCanceled;
   bool    mInitialized;
   bool    mUrlHasStopped;
   bool    mRequestHasStopped;
   nsresult InitializeDownload(nsIRequest * aRequest, uint32_t aBytesDownloaded);
+
+private:
+  virtual ~nsSaveMsgListener();
 };
 
 class nsSaveAllAttachmentsState
 {
 public:
   nsSaveAllAttachmentsState(uint32_t count,
                             const char **contentTypeArray,
                             const char **urlArray,
@@ -2471,17 +2473,16 @@ public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSISTREAMLISTENER
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSIURLLISTENER
   NS_DECL_NSIMSGCOPYSERVICELISTENER
 
 public:
   nsDelAttachListener();
-  virtual ~nsDelAttachListener();
   nsresult StartProcessing(nsMessenger * aMessenger, nsIMsgWindow * aMsgWindow,
     nsAttachmentState * aAttach, bool aSaveFirst);
   nsresult DeleteOriginalMessage();
   void SelectNewMessage();
 
 public:
   nsAttachmentState * mAttach;                      // list of attachments to process
   bool mSaveFirst;                                // detach (true) or delete (false)
@@ -2502,16 +2503,19 @@ public:
       eUpdatingFolder, // for IMAP
       eDeletingOldMessage,
       eSelectingNewMessage
     } m_state;
    // temp
   bool mWrittenExtra;
   bool mDetaching;
   nsTArray<nsCString> mDetachedFileUris;
+
+private:
+  virtual ~nsDelAttachListener();
 };
 
 //
 // nsISupports
 //
 NS_IMPL_ISUPPORTS(nsDelAttachListener,
                    nsIStreamListener,
                    nsIRequestObserver,
--- a/mailnews/base/src/nsMessenger.h
+++ b/mailnews/base/src/nsMessenger.h
@@ -19,17 +19,16 @@
 #include "nsTArray.h"
 #include "nsIFolderListener.h"
 
 class nsMessenger : public nsIMessenger, public nsSupportsWeakReference, public nsIFolderListener
 {
 
 public:
   nsMessenger();
-  virtual ~nsMessenger();
 
   NS_DECL_ISUPPORTS  
   NS_DECL_NSIMESSENGER
   NS_DECL_NSIFOLDERLISTENER
 
   nsresult Alert(const char * stringName);
 
   nsresult SaveAttachment(nsIFile *file, const nsACString& unescapedUrl,
@@ -51,16 +50,18 @@ public:
                               bool detaching);
   nsresult SaveOneAttachment(const char* aContentType,
                              const char* aURL,
                              const char* aDisplayName,
                              const char* aMessageUri,
                              bool detaching);
 
 protected:
+  virtual ~nsMessenger();
+
   void GetString(const nsString& aStringName, nsString& stringValue);
   nsresult InitStringBundle();
   nsresult PromptIfDeleteAttachments(bool saveFirst, uint32_t count, const char **displayNameArray);
 
 private:
   nsresult GetLastSaveDirectory(nsIFile **aLastSaveAsDir);
   // if aLocalFile is a dir, we use it.  otherwise, we use the parent of aLocalFile.
   nsresult SetLastSaveDirectory(nsIFile *aLocalFile);
--- a/mailnews/base/src/nsMessengerBootstrap.h
+++ b/mailnews/base/src/nsMessengerBootstrap.h
@@ -15,15 +15,17 @@
   0x4a85a5d0, 0xcddd, 0x11d2,                     \
   {0xb7, 0xf6, 0x00, 0x80, 0x5f, 0x05, 0xff, 0xa5}}
 
 class nsMessengerBootstrap :
     public nsIMessengerWindowService
 {
 public:
   nsMessengerBootstrap();
-  virtual ~nsMessengerBootstrap();
 
   NS_DECL_THREADSAFE_ISUPPORTS  
   NS_DECL_NSIMESSENGERWINDOWSERVICE
+
+private:
+  virtual ~nsMessengerBootstrap();
 };
 
 #endif
--- a/mailnews/base/src/nsMessengerContentHandler.h
+++ b/mailnews/base/src/nsMessengerContentHandler.h
@@ -5,16 +5,16 @@
 
 #include "nsIContentHandler.h"
 #include "nsIURI.h"
 
 class nsMessengerContentHandler : public nsIContentHandler
 {
 public:
   nsMessengerContentHandler();
-  virtual ~nsMessengerContentHandler();
   
   NS_DECL_ISUPPORTS
   NS_DECL_NSICONTENTHANDLER
     
 private:
+  virtual ~nsMessengerContentHandler();
   nsresult OpenWindow(nsIURI* aURI);
 };
--- a/mailnews/base/src/nsMessengerOSXIntegration.h
+++ b/mailnews/base/src/nsMessengerOSXIntegration.h
@@ -24,26 +24,27 @@ class nsIStringBundle;
 
 class nsMessengerOSXIntegration : public nsIMessengerOSIntegration,
                                   public nsIFolderListener,
                                   public nsIObserver,
                                   public mozINewMailListener
 {
 public:
   nsMessengerOSXIntegration();
-  virtual ~nsMessengerOSXIntegration();
   virtual nsresult Init();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMESSENGEROSINTEGRATION
   NS_DECL_NSIFOLDERLISTENER
   NS_DECL_NSIOBSERVER
   NS_DECL_MOZINEWMAILLISTENER
 
 private:
+  virtual ~nsMessengerOSXIntegration();
+
   nsCOMPtr<nsIAtom> mBiffStateAtom;
   nsCOMPtr<nsIAtom> mNewMailReceivedAtom;
   nsresult ShowAlertMessage(const nsAString& aAlertTitle, const nsAString& aAlertText, const nsACString& aFolderURI);
   nsresult OnAlertFinished();
   nsresult OnAlertClicked(const char16_t * aAlertCookie);
 #ifdef MOZ_SUITE
   nsresult OnAlertClickedSimple();
 #endif
--- a/mailnews/base/src/nsMessengerUnixIntegration.h
+++ b/mailnews/base/src/nsMessengerUnixIntegration.h
@@ -33,16 +33,17 @@ public:
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMESSENGEROSINTEGRATION
   NS_DECL_NSIFOLDERLISTENER
   NS_DECL_NSIOBSERVER
   NS_DECL_NSIURLLISTENER
 
 private:
+  virtual ~nsMessengerUnixIntegration() {}
   nsresult ShowAlertMessage(const nsAString& aAlertTitle, const nsAString& aAlertText, const nsACString& aFolderURI);
   nsresult GetFirstFolderWithNewMail(nsACString& aFolderURI);
   nsresult GetStringBundle(nsIStringBundle **aBundle);
   nsresult AlertFinished();
   nsresult AlertClicked();
   void FillToolTipInfo();
   nsresult GetMRUTimestampForFolder(nsIMsgFolder *aFolder, uint32_t *aLastMRUTime);
 
--- a/mailnews/base/src/nsMessengerWinIntegration.h
+++ b/mailnews/base/src/nsMessengerWinIntegration.h
@@ -43,30 +43,30 @@ typedef HRESULT (__stdcall *fnSHQueryUse
 class nsIStringBundle; 
 
 class nsMessengerWinIntegration : public nsIMessengerOSIntegration,
                                   public nsIFolderListener,
                                   public nsIObserver
 {
 public:
   nsMessengerWinIntegration();
-  virtual ~nsMessengerWinIntegration();
   virtual nsresult Init();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMESSENGEROSINTEGRATION
   NS_DECL_NSIFOLDERLISTENER
   NS_DECL_NSIOBSERVER
 
   nsresult ShowNewAlertNotification(bool aUserInitiated, const nsString& aAlertTitle, const nsString& aAlertText);
 #ifndef MOZ_THUNDERBIRD
   nsresult ShowAlertMessage(const nsString& aAlertTitle, const nsString& aAlertText, const nsACString& aFolderURI);
 #endif
 
 private:
+  virtual ~nsMessengerWinIntegration();
   nsresult AlertFinished();
   nsresult AlertClicked();
 #ifdef MOZ_SUITE
   nsresult AlertClickedSimple();
 #endif
 
   void InitializeBiffStatusIcon(); 
   void FillToolTipInfo();
--- a/mailnews/base/src/nsMsgAccount.h
+++ b/mailnews/base/src/nsMsgAccount.h
@@ -9,22 +9,22 @@
 #include "nsStringGlue.h"
 #include "nsIMutableArray.h"
 
 class nsMsgAccount : public nsIMsgAccount
 {
 
 public:
   nsMsgAccount();
-  virtual ~nsMsgAccount();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGACCOUNT
 
 private:
+  virtual ~nsMsgAccount();
   nsCString m_accountKey;
   nsCOMPtr<nsIPrefBranch> m_prefs;
   nsCOMPtr<nsIMsgIncomingServer> m_incomingServer;
 
   nsCOMPtr<nsIMutableArray> m_identities;
 
   nsresult getPrefService();
   nsresult createIncomingServer();
--- a/mailnews/base/src/nsMsgAccountManager.h
+++ b/mailnews/base/src/nsMsgAccountManager.h
@@ -26,21 +26,20 @@
 #include "nsInterfaceHashtable.h"
 #include "nsIMsgDatabase.h"
 #include "nsIDBChangeListener.h"
 #include "nsAutoPtr.h"
 #include "nsTObserverArray.h"
 
 class nsIRDFService;
 
-class VirtualFolderChangeListener : public nsIDBChangeListener
+class VirtualFolderChangeListener MOZ_FINAL : public nsIDBChangeListener
 {
 public:
   VirtualFolderChangeListener();
-  ~VirtualFolderChangeListener() {}
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIDBCHANGELISTENER
 
   nsresult Init();
   /**
    * Posts an event to update the summary totals and commit the db.
    * We post the event to avoid committing each time we're called
@@ -53,44 +52,47 @@ public:
   void DecrementNewMsgCount();
 
   nsCOMPtr <nsIMsgFolder> m_virtualFolder; // folder we're listening to db changes on behalf of.
   nsCOMPtr <nsIMsgFolder> m_folderWatching; // folder whose db we're listening to.
   nsCOMPtr <nsISupportsArray> m_searchTerms;
   nsCOMPtr <nsIMsgSearchSession> m_searchSession;
   bool m_searchOnMsgStatus;
   bool m_batchingEvents;
+
+private:
+  ~VirtualFolderChangeListener() {}
 };
 
 
 class nsMsgAccountManager: public nsIMsgAccountManager,
     public nsIObserver,
     public nsSupportsWeakReference,
     public nsIUrlListener,
     public nsIFolderListener
 {
 public:
 
   nsMsgAccountManager();
-  virtual ~nsMsgAccountManager();
   
   NS_DECL_THREADSAFE_ISUPPORTS
  
   /* nsIMsgAccountManager methods */
   
   NS_DECL_NSIMSGACCOUNTMANAGER
   NS_DECL_NSIOBSERVER  
   NS_DECL_NSIURLLISTENER
   NS_DECL_NSIFOLDERLISTENER
 
   nsresult Init();
   nsresult Shutdown();
   void LogoutOfServer(nsIMsgIncomingServer *aServer);
 
 private:
+  virtual ~nsMsgAccountManager();
 
   bool m_accountsLoaded;
   nsCOMPtr <nsIMsgFolderCache> m_msgFolderCache;
   nsCOMPtr<nsIAtom> kDefaultServerAtom;
   nsCOMPtr<nsIAtom> mFolderFlagAtom;
   nsTArray<nsCOMPtr<nsIMsgAccount> > m_accounts;
   nsInterfaceHashtable<nsCStringHashKey, nsIMsgIdentity> m_identities;
   nsInterfaceHashtable<nsCStringHashKey, nsIMsgIncomingServer> m_incomingServers;
--- a/mailnews/base/src/nsMsgBiffManager.h
+++ b/mailnews/base/src/nsMsgBiffManager.h
@@ -24,26 +24,27 @@ typedef struct {
 class nsMsgBiffManager
   : public nsIMsgBiffManager,
     public nsIIncomingServerListener,
     public nsIObserver,
     public nsSupportsWeakReference
 {
 public:
   nsMsgBiffManager(); 
-  virtual ~nsMsgBiffManager();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGBIFFMANAGER
   NS_DECL_NSIINCOMINGSERVERLISTENER
   NS_DECL_NSIOBSERVER
 
   nsresult PerformBiff();
 
 protected:
+  virtual ~nsMsgBiffManager();
+
   int32_t FindServer(nsIMsgIncomingServer *server);
   nsresult SetNextBiffTime(nsBiffEntry &biffEntry, PRTime currentTime);
   nsresult SetupNextBiff();
   nsresult AddBiffEntry(nsBiffEntry &biffEntry);
 
 protected:
   nsCOMPtr<nsITimer> mBiffTimer;
   nsTArray<nsBiffEntry> mBiffArray;
--- a/mailnews/base/src/nsMsgContentPolicy.h
+++ b/mailnews/base/src/nsMsgContentPolicy.h
@@ -34,26 +34,27 @@ class nsIDocShell;
 
 class nsMsgContentPolicy : public nsIContentPolicy,
                            public nsIObserver,
                            public nsIWebProgressListener,
                            public nsSupportsWeakReference
 {
 public:
   nsMsgContentPolicy();
-  virtual ~nsMsgContentPolicy();
 
   nsresult Init();
     
   NS_DECL_ISUPPORTS
   NS_DECL_NSICONTENTPOLICY
   NS_DECL_NSIOBSERVER
   NS_DECL_NSIWEBPROGRESSLISTENER
   
 protected:
+  virtual ~nsMsgContentPolicy();
+
   bool     mBlockRemoteImages;
   bool     mAllowPlugins;
   nsCString mTrustedMailDomains;
   nsCOMPtr<nsIPermissionManager> mPermissionManager;
 
   bool IsTrustedDomain(nsIURI * aContentLocation);
   bool IsSafeRequestingLocation(nsIURI *aRequestingLocation);
   bool IsExposedProtocol(nsIURI *aContentLocation);
--- a/mailnews/base/src/nsMsgCopyService.h
+++ b/mailnews/base/src/nsMsgCopyService.h
@@ -66,23 +66,23 @@ public:
     nsString m_dstFolderName;      // used for copy folder.
     nsTArray<nsCopySource*> m_copySourceArray; // array of nsCopySource
 };
 
 class nsMsgCopyService : public nsIMsgCopyService
 {
 public:
   nsMsgCopyService();
-  virtual ~nsMsgCopyService();
 
   NS_DECL_THREADSAFE_ISUPPORTS 
 
   NS_DECL_NSIMSGCOPYSERVICE
 
 private:
+  virtual ~nsMsgCopyService();
 
   nsresult ClearRequest(nsCopyRequest* aRequest, nsresult rv);
   nsresult DoCopy(nsCopyRequest* aRequest);
   nsresult DoNextCopy();
   nsCopyRequest* FindRequest(nsISupports* aSupport, nsIMsgFolder* dstFolder);
   nsresult QueueRequest(nsCopyRequest* aRequest, bool *aCopyImmediately);
   void LogCopyCompletion(nsISupports *aSrc, nsIMsgFolder *aDest);
   void LogCopyRequest(const char *logMsg, nsCopyRequest* aRequest);
--- a/mailnews/base/src/nsMsgDBView.h
+++ b/mailnews/base/src/nsMsgDBView.h
@@ -96,32 +96,33 @@ struct IdKeyPtr : public IdUint32
 // This is an abstract implementation class.
 // The actual view objects will be instances of sub-classes of this class
 class nsMsgDBView : public nsIMsgDBView, public nsIDBChangeListener,
                     public nsITreeView,
                     public nsIJunkMailClassificationListener
 {
 public:
   nsMsgDBView();
-  virtual ~nsMsgDBView();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGDBVIEW
   NS_DECL_NSIDBCHANGELISTENER
   NS_DECL_NSITREEVIEW
   NS_DECL_NSIJUNKMAILCLASSIFICATIONLISTENER
 
   nsMsgViewIndex GetInsertIndexHelper(nsIMsgDBHdr *msgHdr, nsTArray<nsMsgKey> &keys,
                                       nsCOMArray<nsIMsgFolder> *folders,
                                         nsMsgViewSortOrderValue sortOrder,
                                         nsMsgViewSortTypeValue sortType);
   int32_t  SecondarySort(nsMsgKey key1, nsISupports *folder1, nsMsgKey key2, nsISupports *folder2,
                          class viewSortInfo *comparisonContext);
 
 protected:
+  virtual ~nsMsgDBView();
+
   static nsrefcnt gInstanceCount;
 
   static char16_t* kHighestPriorityString;
   static char16_t* kHighPriorityString;
   static char16_t* kLowestPriorityString;
   static char16_t* kLowPriorityString;
   static char16_t* kNormalPriorityString;
 
@@ -466,26 +467,28 @@ private:
 
   nsresult PerformActionsOnJunkMsgs(bool msgsAreJunk);
   nsresult DetermineActionsForJunkChange(bool msgsAreJunk,
                                          nsIMsgFolder *srcFolder,
                                          bool &moveMessages,
                                          bool &changeReadState,
                                          nsIMsgFolder** targetFolder);
 
-  class nsMsgViewHdrEnumerator : public nsISimpleEnumerator 
+  class nsMsgViewHdrEnumerator MOZ_FINAL : public nsISimpleEnumerator
   {
   public:
     NS_DECL_ISUPPORTS
 
     // nsISimpleEnumerator methods:
     NS_DECL_NSISIMPLEENUMERATOR
 
     // nsMsgThreadEnumerator methods:
     nsMsgViewHdrEnumerator(nsMsgDBView *view);
-    ~nsMsgViewHdrEnumerator();
 
     nsRefPtr <nsMsgDBView> m_view;
     nsMsgViewIndex m_curHdrIndex;
+
+  private:
+    ~nsMsgViewHdrEnumerator();
   };
 };
 
 #endif
--- a/mailnews/base/src/nsMsgFolderCache.h
+++ b/mailnews/base/src/nsMsgFolderCache.h
@@ -14,22 +14,23 @@
 
 class nsMsgFolderCache : public nsIMsgFolderCache
 {
 
 public:
   friend class nsMsgFolderCacheElement;
 
   nsMsgFolderCache();
-  virtual ~nsMsgFolderCache();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGFOLDERCACHE
 
 protected:
+  virtual ~nsMsgFolderCache();
+
   void GetMDBFactory(nsIMdbFactory ** aMdbFactory);
   nsresult AddCacheElement(const nsACString& key, nsIMdbRow *row, nsIMsgFolderCacheElement **result);
   nsresult RowCellColumnToCharPtr(nsIMdbRow *hdrRow, mdb_token columnToken, nsACString& resultPtr);
   nsresult InitMDBInfo();
   nsresult InitNewDB();
   nsresult InitExistingDB();
   nsresult OpenMDB(const nsACString& dbName, bool create);
   nsIMdbEnv *GetEnv() {return m_mdbEnv;}
--- a/mailnews/base/src/nsMsgFolderCacheElement.h
+++ b/mailnews/base/src/nsMsgFolderCacheElement.h
@@ -9,25 +9,26 @@
 #include "nsIMsgFolderCacheElement.h"
 #include "nsMsgFolderCache.h"
 #include "mdb.h"
 
 class nsMsgFolderCacheElement : public nsIMsgFolderCacheElement
 {
 public:
   nsMsgFolderCacheElement();
-  virtual ~nsMsgFolderCacheElement();
   friend class nsMsgFolderCache;
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGFOLDERCACHEELEMENT
 
   void SetMDBRow(nsIMdbRow *row);
   void SetOwningCache(nsMsgFolderCache *owningCache);
 protected:
+  virtual ~nsMsgFolderCacheElement();
+
   nsIMdbRow *m_mdbRow;
 
   nsMsgFolderCache *m_owningCache; // this will be ref-counted. Is this going to be a problem?
   // I want to avoid circular references, but since this is
   // scriptable, I think I have to ref-count it.
   nsCString m_folderKey;
 };
 
--- a/mailnews/base/src/nsMsgFolderCompactor.h
+++ b/mailnews/base/src/nsMsgFolderCompactor.h
@@ -28,18 +28,19 @@ public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
   NS_DECL_NSICOPYMESSAGESTREAMLISTENER
   NS_DECL_NSIURLLISTENER
   NS_DECL_NSIMSGFOLDERCOMPACTOR
 
   nsFolderCompactState(void);
+protected:
   virtual ~nsFolderCompactState(void);
-protected:
+
   virtual nsresult InitDB(nsIMsgDatabase *db);
   virtual nsresult StartCompacting();
   virtual nsresult FinishCompact();
   void CloseOutputStream();
   void  CleanupTempFilesAfterError();
 
   nsresult Init(nsIMsgFolder *aFolder, const char* aBaseMsgUri, nsIMsgDatabase *aDb,
                             nsIFile *aPath, nsIMsgWindow *aMsgWindow);
--- a/mailnews/base/src/nsMsgGroupThread.cpp
+++ b/mailnews/base/src/nsMsgGroupThread.cpp
@@ -327,19 +327,19 @@ public:
   NS_DECL_NSISIMPLEENUMERATOR
     
   // nsMsgGroupThreadEnumerator methods:
   typedef nsresult (*nsMsgGroupThreadEnumeratorFilter)(nsIMsgDBHdr* hdr, void* closure);
   
   nsMsgGroupThreadEnumerator(nsMsgGroupThread *thread, nsMsgKey startKey,
   nsMsgGroupThreadEnumeratorFilter filter, void* closure);
   int32_t MsgKeyFirstChildIndex(nsMsgKey inMsgKey);
-  virtual ~nsMsgGroupThreadEnumerator();
   
 protected:
+  virtual ~nsMsgGroupThreadEnumerator();
   
   nsresult                Prefetch();
   
   nsCOMPtr <nsIMsgDBHdr>  mResultHdr;
   nsMsgGroupThread*       mThread;
   nsMsgKey                mThreadParentKey;
   nsMsgKey                mFirstMsgKey;
   int32_t                 mChildIndex;
--- a/mailnews/base/src/nsMsgGroupThread.h
+++ b/mailnews/base/src/nsMsgGroupThread.h
@@ -17,22 +17,23 @@ class nsMsgGroupView;
 
 class nsMsgGroupThread : public nsIMsgThread
 {
 public:
   friend class nsMsgGroupView;
 
   nsMsgGroupThread();
   nsMsgGroupThread(nsIMsgDatabase *db);
-  virtual ~nsMsgGroupThread();
 
   NS_DECL_NSIMSGTHREAD
   NS_DECL_ISUPPORTS
 
 protected:
+  virtual ~nsMsgGroupThread();
+
   void      Init();
   nsMsgViewIndex AddChildFromGroupView(nsIMsgDBHdr *child, nsMsgDBView *view);
   nsresult  RemoveChild(nsMsgKey msgKey);
   nsresult  RerootThread(nsIMsgDBHdr *newParentOfOldRoot, nsIMsgDBHdr *oldRoot, nsIDBChangeAnnouncer *announcer);
 
   virtual nsMsgViewIndex AddMsgHdrInDateOrder(nsIMsgDBHdr *child, nsMsgDBView *view);
   virtual nsMsgViewIndex GetInsertIndexFromView(nsMsgDBView *view, 
                                           nsIMsgDBHdr *child, 
@@ -57,23 +58,24 @@ protected:
   bool            m_dummy; // top level msg is a dummy, e.g., grouped by age.
   nsCOMPtr <nsIMsgDatabase> m_db; // should we make a weak ref or just a ptr?
 };
 
 class nsMsgXFGroupThread : public nsMsgGroupThread
 {
 public:
   nsMsgXFGroupThread();
-  virtual ~nsMsgXFGroupThread();
 
   NS_IMETHOD GetNumChildren(uint32_t *aNumChildren) MOZ_OVERRIDE;
   NS_IMETHOD GetChildKeyAt(uint32_t aIndex, nsMsgKey *aResult) MOZ_OVERRIDE;
   NS_IMETHOD GetChildHdrAt(uint32_t aIndex, nsIMsgDBHdr **aResult) MOZ_OVERRIDE;
   NS_IMETHOD RemoveChildAt(uint32_t aIndex) MOZ_OVERRIDE;
 protected:
+  virtual ~nsMsgXFGroupThread();
+
   virtual void InsertMsgHdrAt(nsMsgViewIndex index,
                               nsIMsgDBHdr *hdr) MOZ_OVERRIDE;
   virtual void SetMsgHdrAt(nsMsgViewIndex index, nsIMsgDBHdr *hdr) MOZ_OVERRIDE;
   virtual nsMsgViewIndex FindMsgHdr(nsIMsgDBHdr *hdr) MOZ_OVERRIDE;
   virtual nsMsgViewIndex AddMsgHdrInDateOrder(nsIMsgDBHdr *child, 
                                               nsMsgDBView *view) MOZ_OVERRIDE;
   virtual nsMsgViewIndex GetInsertIndexFromView(nsMsgDBView *view, 
                                           nsIMsgDBHdr *child, 
--- a/mailnews/base/src/nsMsgMailSession.h
+++ b/mailnews/base/src/nsMsgMailSession.h
@@ -30,26 +30,27 @@
 // cruft in it....
 //////////////////////////////////////////////////////////////////////////////////
 
 class nsMsgMailSession : public nsIMsgMailSession,
                          public nsIFolderListener
 {
 public:
   nsMsgMailSession();
-  virtual ~nsMsgMailSession();
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIMSGMAILSESSION
   NS_DECL_NSIFOLDERLISTENER
 
   nsresult Init();
   nsresult GetSelectedLocaleDataDir(nsIFile *defaultsDir);
 
 protected:
+  virtual ~nsMsgMailSession();
+
   struct folderListener {
     nsCOMPtr<nsIFolderListener> mListener;
     uint32_t mNotifyFlags;
 
     folderListener(nsIFolderListener *aListener, uint32_t aNotifyFlags)
       : mListener(aListener), mNotifyFlags(aNotifyFlags) {}
     folderListener(const folderListener &aListener)
       : mListener(aListener.mListener), mNotifyFlags(aListener.mNotifyFlags) {}
@@ -75,28 +76,29 @@ protected:
 /********************************************************************************/
 
 class nsMsgShutdownService : public nsIMsgShutdownService,
                              public nsIUrlListener,
                              public nsIObserver
 {
 public:
   nsMsgShutdownService();
-  virtual ~nsMsgShutdownService();
   
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGSHUTDOWNSERVICE
   NS_DECL_NSIURLLISTENER
   NS_DECL_NSIOBSERVER
     
 protected:
   nsresult ProcessNextTask();
   void AttemptShutdown();
   
 private:
+  virtual ~nsMsgShutdownService();
+
   nsCOMArray<nsIMsgShutdownTask> mShutdownTasks;
   nsCOMPtr<nsIMsgProgress>       mMsgProgress;
   uint32_t                       mTaskIndex;
   uint32_t                       mQuitMode;
   bool mProcessedShutdown;
   bool mQuitForced;
   bool mReadyToQuit;
 };
--- a/mailnews/base/src/nsMsgOfflineManager.h
+++ b/mailnews/base/src/nsMsgOfflineManager.h
@@ -21,17 +21,16 @@ class nsMsgOfflineManager
       public nsIObserver,
       public nsSupportsWeakReference,
       public nsIMsgSendLaterListener,
     public nsIUrlListener
 {
 public:
 
   nsMsgOfflineManager();
-  virtual ~nsMsgOfflineManager();
   
   NS_DECL_THREADSAFE_ISUPPORTS
  
   /* nsIMsgOfflineManager methods */
   
   NS_DECL_NSIMSGOFFLINEMANAGER
   NS_DECL_NSIOBSERVER  
   NS_DECL_NSIURLLISTENER
@@ -51,16 +50,18 @@ public:
   typedef enum 
   {
     eGoingOnline = 0,
     eDownloadingForOffline = 1,
     eNoOp = 2 // no operation in progress
   } offlineManagerOperation;
 
 private:
+  virtual ~nsMsgOfflineManager();
+
   nsresult AdvanceToNextState(nsresult exitStatus);
   nsresult SynchronizeOfflineImapChanges();
   nsresult StopRunning(nsresult exitStatus);
   nsresult SendUnsentMessages();
   nsresult DownloadOfflineNewsgroups();
   nsresult DownloadMail();
 
   nsresult SetOnlineState(bool online);
--- a/mailnews/base/src/nsMsgPrintEngine.h
+++ b/mailnews/base/src/nsMsgPrintEngine.h
@@ -30,17 +30,16 @@
 
 class nsMsgPrintEngine : public nsIMsgPrintEngine,
                          public nsIWebProgressListener,
                          public nsIObserver,
                          public nsSupportsWeakReference {
 
 public:
   nsMsgPrintEngine();
-  virtual ~nsMsgPrintEngine();
 
   // nsISupports
   NS_DECL_ISUPPORTS
 
   // nsIMsgPrintEngine interface
   NS_DECL_NSIMSGPRINTENGINE
 
   // For nsIWebProgressListener
@@ -48,16 +47,17 @@ public:
 
   // For nsIObserver
   NS_DECL_NSIOBSERVER
 
   void PrintMsgWindow();
   NS_IMETHOD  StartNextPrintOperation();
 
 protected:
+  virtual ~nsMsgPrintEngine();
 
   bool        FirePrintEvent();
   nsresult    FireStartNextEvent();
   nsresult    FireThatLoadOperationStartup(const nsString& uri);
   nsresult    FireThatLoadOperation(const nsString& uri);
   void        InitializeDisplayCharset();
   void        SetupObserver();
   nsresult    SetStatusMessage(const nsString& aMsgString);
--- a/mailnews/base/src/nsMsgProgress.h
+++ b/mailnews/base/src/nsMsgProgress.h
@@ -19,25 +19,25 @@
 
 class nsMsgProgress : public nsIMsgProgress, 
                       public nsIMsgStatusFeedback, 
                       public nsIProgressEventSink,
                       public nsSupportsWeakReference
 {
 public: 
   nsMsgProgress();
-  virtual ~nsMsgProgress();
   
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIMSGPROGRESS
   NS_DECL_NSIWEBPROGRESSLISTENER
   NS_DECL_NSIMSGSTATUSFEEDBACK
   NS_DECL_NSIPROGRESSEVENTSINK
 
 private:
+  virtual ~nsMsgProgress();
   nsresult ReleaseListeners(void);
   
   bool                               m_closeProgress;
   bool                               m_processCanceled;
   nsString                           m_pendingStatus;
   int32_t                            m_pendingStateFlags;
   nsresult                           m_pendingStateValue;
   nsWeakPtr                          m_msgWindow;
--- a/mailnews/base/src/nsMsgPurgeService.h
+++ b/mailnews/base/src/nsMsgPurgeService.h
@@ -18,25 +18,25 @@
 #include "nsIMutableArray.h"
 
 class nsMsgPurgeService
 	: public nsIMsgPurgeService,
 		public nsIMsgSearchNotify
 {
 public:
 	nsMsgPurgeService(); 
-	virtual ~nsMsgPurgeService();
 
 	NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGPURGESERVICE
 	NS_DECL_NSIMSGSEARCHNOTIFY
 
 	nsresult PerformPurge();
 
 protected:
+	virtual ~nsMsgPurgeService();
   int32_t FindServer(nsIMsgIncomingServer *server);
   nsresult SetupNextPurge();
   nsresult PurgeSurver(nsIMsgIncomingServer *server);
   nsresult SearchFolderToPurge(nsIMsgFolder *folder, int32_t purgeInterval);
 
 protected:
   nsCOMPtr<nsITimer> mPurgeTimer;
   nsCOMPtr<nsIMsgSearchSession> mSearchSession;
--- a/mailnews/base/src/nsMsgRDFDataSource.h
+++ b/mailnews/base/src/nsMsgRDFDataSource.h
@@ -21,31 +21,31 @@
 
 class nsMsgRDFDataSource : public nsIRDFDataSource,
                            public nsIObserver,
                            public nsSupportsWeakReference,
                            public nsIMsgRDFDataSource
 {
  public:
   nsMsgRDFDataSource();
-  virtual ~nsMsgRDFDataSource();
   virtual nsresult Init();
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsMsgRDFDataSource,
                                            nsIRDFDataSource)
   NS_DECL_NSIMSGRDFDATASOURCE
   NS_DECL_NSIRDFDATASOURCE
   NS_DECL_NSIOBSERVER
 
   // called to reset the datasource to an empty state
   // if you need to release yourself as an observer/listener, do it here
   virtual void Cleanup();
 
  protected:
+  virtual ~nsMsgRDFDataSource();
   nsIRDFService *getRDFService();
   static bool assertEnumFunc(nsIRDFObserver *aObserver, void *aData);
   static bool unassertEnumFunc(nsIRDFObserver *aObserver, void *aData);
   static bool changeEnumFunc(nsIRDFObserver *aObserver, void *aData);
   nsresult  NotifyObservers(nsIRDFResource *subject, nsIRDFResource *property,
                             nsIRDFNode *newObject, nsIRDFNode *oldObject, 
                             bool assert, bool change);
 
--- a/mailnews/base/src/nsMsgServiceProvider.h
+++ b/mailnews/base/src/nsMsgServiceProvider.h
@@ -11,23 +11,24 @@
 #include "nsIRDFCompositeDataSource.h"
 #include "nsCOMPtr.h"
 
 class nsMsgServiceProviderService : public nsIRDFDataSource
 {
 
  public:
   nsMsgServiceProviderService();
-  virtual ~nsMsgServiceProviderService();
 
   nsresult Init();
   
   NS_DECL_ISUPPORTS
   NS_FORWARD_NSIRDFDATASOURCE(mInnerDataSource->)
   
  private:
+  virtual ~nsMsgServiceProviderService();
+
   nsCOMPtr<nsIRDFCompositeDataSource> mInnerDataSource;
   nsresult LoadDataSource(const char *aURL);
 
   void LoadISPFilesFromDir(nsIFile* aDir);
   void LoadISPFiles();
 };
 #endif
--- a/mailnews/base/src/nsMsgStatusFeedback.h
+++ b/mailnews/base/src/nsMsgStatusFeedback.h
@@ -18,24 +18,25 @@
 
 class nsMsgStatusFeedback : public nsIMsgStatusFeedback,
                             public nsIProgressEventSink,
                             public nsIWebProgressListener,
                             public nsSupportsWeakReference
 {
 public:
   nsMsgStatusFeedback();
-  virtual ~nsMsgStatusFeedback();
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIMSGSTATUSFEEDBACK
   NS_DECL_NSIWEBPROGRESSLISTENER
   NS_DECL_NSIPROGRESSEVENTSINK
 
 protected:
+  virtual ~nsMsgStatusFeedback();
+
   bool             m_meteorsSpinning;
   int32_t          m_lastPercent;
   int64_t          m_lastProgressTime;
 
   void BeginObserving();
   void EndObserving();
 
   // the JS status feedback implementation object...eventually this object
--- a/mailnews/base/src/nsMsgTagService.h
+++ b/mailnews/base/src/nsMsgTagService.h
@@ -7,35 +7,36 @@
 #define nsMsgTagService_h__
 
 #include "nsIMsgTagService.h"
 #include "nsIPrefBranch.h"
 #include "nsCOMPtr.h"
 #include "nsStringGlue.h"
 #include "nsTArray.h"
 
-class nsMsgTag : public nsIMsgTag
+class nsMsgTag MOZ_FINAL : public nsIMsgTag
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGTAG
 
   nsMsgTag(const nsACString &aKey,
            const nsAString  &aTag,
            const nsACString &aColor,
            const nsACString &aOrdinal);
+
+protected:
   ~nsMsgTag();
 
-protected:
   nsString  mTag;
   nsCString mKey, mColor, mOrdinal;
 };
 
 
-class nsMsgTagService : public nsIMsgTagService
+class nsMsgTagService MOZ_FINAL : public nsIMsgTagService
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGTAGSERVICE
 
   nsMsgTagService();
 
 private:
--- a/mailnews/base/src/nsMsgWindow.h
+++ b/mailnews/base/src/nsMsgWindow.h
@@ -22,22 +22,22 @@ class nsMsgWindow : public nsIMsgWindow,
                     public nsSupportsWeakReference
 {
 
 public:
 
   NS_DECL_THREADSAFE_ISUPPORTS
 
   nsMsgWindow();
-  virtual ~nsMsgWindow();
   nsresult Init();
   NS_DECL_NSIMSGWINDOW
   NS_DECL_NSIURICONTENTLISTENER
 
 protected:
+  virtual ~nsMsgWindow();
   nsCOMPtr<nsIMsgHeaderSink> mMsgHeaderSink;
   nsCOMPtr<nsIMsgStatusFeedback> mStatusFeedback;
   nsCOMPtr<nsITransactionManager> mTransactionManager;
   nsCOMPtr<nsIMsgFolder> mOpenFolder;
   nsCOMPtr<nsIMsgWindowCommands> mMsgWindowCommands;
   // These are used by the backend protocol code to attach
   // notification callbacks to channels, e.g., nsIBadCertListner2.
   nsCOMPtr<nsIInterfaceRequestor> mNotificationCallbacks;
--- a/mailnews/base/src/nsMsgXFViewThread.h
+++ b/mailnews/base/src/nsMsgXFViewThread.h
@@ -16,17 +16,16 @@
 
 class nsMsgSearchDBView;
 
 class nsMsgXFViewThread : public nsIMsgThread
 {
 public:
 
   nsMsgXFViewThread(nsMsgSearchDBView *view, nsMsgKey threadId);
-  virtual ~nsMsgXFViewThread();
 
   NS_DECL_NSIMSGTHREAD
   NS_DECL_ISUPPORTS
 
   bool      IsHdrParentOf(nsIMsgDBHdr *possibleParent,
                           nsIMsgDBHdr *possibleChild);
 
   void      ChangeUnreadChildCount(int32_t delta);
@@ -34,16 +33,18 @@ public:
 
   nsresult  AddHdr(nsIMsgDBHdr *newHdr, bool reparentChildren, 
                    uint32_t &whereInserted, nsIMsgDBHdr **outParent);
   int32_t   HdrIndex(nsIMsgDBHdr *hdr);
   uint32_t  ChildLevelAt(uint32_t msgIndex) {return m_levels[msgIndex];}
   uint32_t  MsgCount() {return m_numChildren;};
 
 protected:
+  virtual ~nsMsgXFViewThread();
+
   nsMsgSearchDBView *m_view;
   uint32_t        m_numUnreadChildren;
   uint32_t        m_numChildren;
   uint32_t        m_flags;
   uint32_t        m_newestMsgDate;
   nsMsgKey        m_threadId;
   nsTArray<nsMsgKey> m_keys;
   nsCOMArray<nsIMsgFolder> m_folders;
--- a/mailnews/base/src/nsSpamSettings.h
+++ b/mailnews/base/src/nsSpamSettings.h
@@ -16,23 +16,24 @@
 #include "nsCOMArray.h"
 #include "nsIAbDirectory.h"
 #include "nsTArray.h"
 
 class nsSpamSettings : public nsISpamSettings, public nsIUrlListener
 {
 public:
   nsSpamSettings();
-  virtual ~nsSpamSettings();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSISPAMSETTINGS
   NS_DECL_NSIURLLISTENER
 
 private:
+  virtual ~nsSpamSettings();
+
   nsCOMPtr <nsIOutputStream> mLogStream;
   nsCOMPtr<nsIFile> mLogFile;
 
   int32_t mLevel; 
   int32_t mPurgeInterval;
   int32_t mMoveTargetMode;
 
   bool mPurge;
--- a/mailnews/base/src/nsStatusBarBiffManager.h
+++ b/mailnews/base/src/nsStatusBarBiffManager.h
@@ -18,20 +18,21 @@ class nsStatusBarBiffManager : public ns
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIFOLDERLISTENER
   NS_DECL_NSISTATUSBARBIFFMANAGER
   NS_DECL_NSIOBSERVER
 
   nsStatusBarBiffManager(); 
-  virtual ~nsStatusBarBiffManager();
   nsresult Init();
 
 private:
+  virtual ~nsStatusBarBiffManager();
+
   bool     mInitialized;
   int32_t  mCurrentBiffState;
   nsCOMPtr<nsISound> mSound;
   nsresult PlayBiffSound(const char *aPrefBranch);
 
 protected:
   static nsIAtom* kBiffStateAtom;
 };
--- a/mailnews/base/src/nsSubscribableServer.h
+++ b/mailnews/base/src/nsSubscribableServer.h
@@ -34,24 +34,25 @@ typedef struct _subscribeTreeNode {
 #if defined(DEBUG_sspitzer) || defined(DEBUG_seth)
 #define DEBUG_SUBSCRIBE 1
 #endif
 
 class nsSubscribableServer : public nsISubscribableServer
 {
  public:
   nsSubscribableServer();
-  virtual ~nsSubscribableServer();
 
   nsresult Init();
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSISUBSCRIBABLESERVER
   
 private:
+  virtual ~nsSubscribableServer();
+
   nsresult ConvertNameToUnichar(const char *inStr, char16_t **outStr);
   nsCOMPtr <nsISubscribeListener> mSubscribeListener;
   nsCOMPtr <nsIMsgIncomingServer> mIncomingServer;
   nsCOMPtr <nsISubscribeDataSource> mSubscribeDS;
   char mDelimiter;
   bool mShowFullName;
   bool mStopped;
 
--- a/mailnews/base/src/nsSubscribeDataSource.h
+++ b/mailnews/base/src/nsSubscribeDataSource.h
@@ -17,25 +17,25 @@
 /**
  * The subscribe data source.
  */
 class nsSubscribeDataSource : public nsIRDFDataSource, public nsISubscribeDataSource
 {
 
 public:
   nsSubscribeDataSource();
-  virtual ~nsSubscribeDataSource();
 
   nsresult Init();
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIRDFDATASOURCE
   NS_DECL_NSISUBSCRIBEDATASOURCE
 
 private:
+  virtual ~nsSubscribeDataSource();
   nsCOMPtr <nsIRDFResource>      kNC_Child;
   nsCOMPtr <nsIRDFResource>      kNC_Name;    
   nsCOMPtr <nsIRDFResource>      kNC_LeafName;
   nsCOMPtr <nsIRDFResource>      kNC_Subscribed;
   nsCOMPtr <nsIRDFResource>      kNC_Subscribable;
   nsCOMPtr <nsIRDFResource>      kNC_ServerType;
   nsCOMPtr <nsIRDFLiteral>       kTrueLiteral;
   nsCOMPtr <nsIRDFLiteral>       kFalseLiteral;
--- a/mailnews/base/util/Services.cpp
+++ b/mailnews/base/util/Services.cpp
@@ -35,16 +35,18 @@ namespace {
 class ShutdownObserver MOZ_FINAL : public nsIObserver
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIOBSERVER
 
   static void EnsureInitialized();
 private:
+  ~ShutdownObserver() {}
+
   void ShutdownServices();
   static ShutdownObserver *sShutdownObserver;
   static bool sShuttingDown;
 };
 
 bool ShutdownObserver::sShuttingDown = false;
 ShutdownObserver *ShutdownObserver::sShutdownObserver = nullptr;
 }
--- a/mailnews/base/util/nsImapMoveCoalescer.h
+++ b/mailnews/base/util/nsImapMoveCoalescer.h
@@ -25,47 +25,49 @@ class NS_MSG_BASE nsImapMoveCoalescer : 
 {
 public:
   friend class nsMoveCoalescerCopyListener;
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIURLLISTENER
 
   nsImapMoveCoalescer(nsIMsgFolder *sourceFolder, nsIMsgWindow *msgWindow);
-  virtual ~nsImapMoveCoalescer();
 
   nsresult AddMove(nsIMsgFolder *folder, nsMsgKey key);
   nsresult PlaybackMoves(bool doNewMailNotification = false);
   // this lets the caller store keys in an arbitrary number of buckets. If the bucket
   // for the passed in index doesn't exist, it will get created.
   nsTArray<nsMsgKey> *GetKeyBucket(uint32_t keyArrayIndex);
   nsIMsgWindow *GetMsgWindow() {return m_msgWindow;}
   bool HasPendingMoves() {return m_hasPendingMoves;}
 protected:
+  virtual ~nsImapMoveCoalescer();
   // m_sourceKeyArrays and m_destFolders are parallel arrays.
   nsTArray<nsTArray<nsMsgKey> > m_sourceKeyArrays;
   nsCOMArray<nsIMsgFolder> m_destFolders;
   nsCOMPtr <nsIMsgWindow> m_msgWindow;
   nsCOMPtr <nsIMsgFolder> m_sourceFolder;
   bool m_doNewMailNotification;
   bool m_hasPendingMoves;
   nsTArray<nsMsgKey> m_keyBuckets[2];
   int32_t m_outstandingMoves;
 };
 
-class nsMoveCoalescerCopyListener : public nsIMsgCopyServiceListener
+class nsMoveCoalescerCopyListener MOZ_FINAL : public nsIMsgCopyServiceListener
 {
 public:
     nsMoveCoalescerCopyListener(nsImapMoveCoalescer * coalescer, nsIMsgFolder *destFolder);
-    ~nsMoveCoalescerCopyListener();
     NS_DECL_ISUPPORTS
     NS_DECL_NSIMSGCOPYSERVICELISTENER
 
     nsCOMPtr <nsIMsgFolder> m_destFolder;
 
       nsImapMoveCoalescer *m_coalescer;
     // when we get OnStopCopy, update the folder. When we've finished all the copies,
     // send the biff notification.
+
+private:
+    ~nsMoveCoalescerCopyListener();
 };
 
 
 #endif // _nsImapMoveCoalescer_H
 
--- a/mailnews/base/util/nsMsgCompressIStream.h
+++ b/mailnews/base/util/nsMsgCompressIStream.h
@@ -4,30 +4,30 @@
 
 #include "msgCore.h"
 #include "nsIAsyncInputStream.h"
 #include "nsIInputStream.h"
 #include "nsCOMPtr.h"
 #include "nsAutoPtr.h"
 #include "zlib.h"
 
-class NS_MSG_BASE nsMsgCompressIStream : public nsIAsyncInputStream
+class NS_MSG_BASE nsMsgCompressIStream MOZ_FINAL : public nsIAsyncInputStream
 {
 public:
   nsMsgCompressIStream();
-  ~nsMsgCompressIStream();
 
   NS_DECL_THREADSAFE_ISUPPORTS
     
   NS_DECL_NSIINPUTSTREAM
   NS_DECL_NSIASYNCINPUTSTREAM
 
   nsresult InitInputStream(nsIInputStream *rawStream);
 
 protected:
+  ~nsMsgCompressIStream();
   nsresult DoInflation();
   nsCOMPtr<nsIInputStream> m_iStream;
   nsAutoArrayPtr<char> m_zbuf;
   nsAutoArrayPtr<char> m_databuf;
   char *m_dataptr;
   uint32_t m_dataleft;
   bool m_inflateAgain;
   z_stream m_zstream;
--- a/mailnews/base/util/nsMsgCompressOStream.h
+++ b/mailnews/base/util/nsMsgCompressOStream.h
@@ -3,26 +3,26 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "msgCore.h"
 #include "nsIOutputStream.h"
 #include "nsAutoPtr.h"
 #include "nsCOMPtr.h"
 #include "zlib.h"
 
-class NS_MSG_BASE nsMsgCompressOStream : public nsIOutputStream
+class NS_MSG_BASE nsMsgCompressOStream MOZ_FINAL : public nsIOutputStream
 {
 public:
   nsMsgCompressOStream();
-  ~nsMsgCompressOStream();
 
   NS_DECL_THREADSAFE_ISUPPORTS
 
   NS_DECL_NSIOUTPUTSTREAM
 
   nsresult InitOutputStream(nsIOutputStream *rawStream);
 
 protected:
+  ~nsMsgCompressOStream();
   nsCOMPtr<nsIOutputStream> m_oStream;
   nsAutoArrayPtr<char> m_zbuf;
   z_stream m_zstream;
 };
 
--- a/mailnews/base/util/nsMsgFileStream.h
+++ b/mailnews/base/util/nsMsgFileStream.h
@@ -4,27 +4,30 @@
 
 #include "mozilla/Attributes.h"
 #include "msgCore.h"
 #include "nsIInputStream.h"
 #include "nsIOutputStream.h"
 #include "nsISeekableStream.h"
 #include "prio.h"
 
-class nsMsgFileStream : public nsIInputStream, public nsIOutputStream, public nsISeekableStream
+class nsMsgFileStream MOZ_FINAL : public nsIInputStream,
+                                  public nsIOutputStream,
+                                  public nsISeekableStream
 {
 public:
   nsMsgFileStream();
-  ~nsMsgFileStream();
 
   NS_DECL_ISUPPORTS
 
   NS_IMETHOD Available(uint64_t *_retval) MOZ_OVERRIDE; 
   NS_IMETHOD Read(char * aBuf, uint32_t aCount, uint32_t *_retval) MOZ_OVERRIDE; 
   NS_IMETHOD ReadSegments(nsWriteSegmentFun aWriter, void * aClosure, uint32_t aCount, uint32_t *_retval) MOZ_OVERRIDE;
   NS_DECL_NSIOUTPUTSTREAM
   NS_DECL_NSISEEKABLESTREAM
 
   nsresult InitWithFile(nsIFile *localFile);
 protected:
+  ~nsMsgFileStream();
+
   PRFileDesc *mFileDesc;
   bool mSeekedToEnd;
 };
--- a/mailnews/base/util/nsMsgIdentity.h
+++ b/mailnews/base/util/nsMsgIdentity.h
@@ -7,23 +7,24 @@
 #define nsMsgIdentity_h___
 
 #include "nsIMsgIdentity.h"
 #include "nsIPrefBranch.h"
 #include "msgCore.h"
 #include "nsCOMPtr.h"
 #include "nsStringGlue.h"
 
-class NS_MSG_BASE nsMsgIdentity : public nsIMsgIdentity
+class NS_MSG_BASE nsMsgIdentity MOZ_FINAL : public nsIMsgIdentity
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIMSGIDENTITY
   
 private:
+  ~nsMsgIdentity() {}
   nsCString mKey;
   nsCOMPtr<nsIPrefBranch> mPrefBranch;
   nsCOMPtr<nsIPrefBranch> mDefPrefBranch;
 
 protected:
   nsresult getFolderPref(const char *pref, nsCString&, const char *, uint32_t);
   nsresult setFolderPref(const char *pref, const nsACString&, uint32_t);
 };
--- a/mailnews/base/util/nsMsgIncomingServer.h
+++ b/mailnews/base/util/nsMsgIncomingServer.h
@@ -35,22 +35,22 @@ class nsIMsgProtocolInfo;
 #undef  IMETHOD_VISIBILITY
 #define IMETHOD_VISIBILITY NS_VISIBILITY_DEFAULT
 
 class NS_MSG_BASE nsMsgIncomingServer : public nsIMsgIncomingServer,
                                         public nsSupportsWeakReference
 {
  public:
   nsMsgIncomingServer();
-  virtual ~nsMsgIncomingServer();
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIMSGINCOMINGSERVER
 
 protected:
+  virtual ~nsMsgIncomingServer();
   nsCString m_serverKey;
 
   // Sets m_password, if password found. Can return NS_ERROR_ABORT if the 
   // user cancels the master password dialog.
   nsresult GetPasswordWithoutUI();
 
   nsresult ConfigureTemporaryReturnReceiptsFilter(nsIMsgFilterList *filterList);
   nsresult ConfigureTemporaryServerSpamFilters(nsIMsgFilterList *filterList);
--- a/mailnews/base/util/nsMsgKeyArray.h
+++ b/mailnews/base/util/nsMsgKeyArray.h
@@ -11,17 +11,19 @@
 
 /*
  * This class is a thin wrapper around an nsTArray<nsMsgKey>
  */
 class nsMsgKeyArray : public nsIMsgKeyArray
 {
 public:
   nsMsgKeyArray();
-  virtual ~nsMsgKeyArray();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGKEYARRAY
 
   nsTArray<nsMsgKey> m_keys;
+
+private:
+  virtual ~nsMsgKeyArray();
 };
 
 #endif
--- a/mailnews/base/util/nsMsgMailNewsUrl.cpp
+++ b/mailnews/base/util/nsMsgMailNewsUrl.cpp
@@ -747,19 +747,19 @@ NS_IMETHODIMP nsMsgMailNewsUrl::SetMimeH
 class nsMsgSaveAsListener : public nsIStreamListener
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
 
   nsMsgSaveAsListener(nsIFile *aFile, bool addDummyEnvelope);
-  virtual ~nsMsgSaveAsListener();
   nsresult SetupMsgWriteStream(nsIFile *aFile, bool addDummyEnvelope);
 protected:
+  virtual ~nsMsgSaveAsListener();
   nsCOMPtr<nsIOutputStream> m_outputStream;
   nsCOMPtr<nsIFile> m_outputFile;
   bool m_addDummyEnvelope;
   bool m_writtenData;
   uint32_t m_leftOver;
   char m_dataBuffer[SAVE_BUF_SIZE+1]; // temporary buffer for this save operation
 
 };
--- a/mailnews/base/util/nsMsgProtocol.cpp
+++ b/mailnews/base/util/nsMsgProtocol.cpp
@@ -1028,17 +1028,16 @@ nsresult nsMsgProtocol::DoNtlmStep2(nsCS
 
 class nsMsgProtocolStreamProvider : public nsIOutputStreamCallback
 {
 public:
     // XXX this probably doesn't need to be threadsafe
     NS_DECL_THREADSAFE_ISUPPORTS
 
     nsMsgProtocolStreamProvider() { }
-    virtual ~nsMsgProtocolStreamProvider() {}
 
     void Init(nsMsgAsyncWriteProtocol *aProtInstance, nsIInputStream *aInputStream)
     {
       mMsgProtocol = do_GetWeakReference(static_cast<nsIStreamListener*> (aProtInstance));
       mInStream = aInputStream;
     }
 
     //
@@ -1097,37 +1096,39 @@ public:
           rv = aOutStream->AsyncWait(this, 0, 0, protInst->mProviderThread);
 
         NS_ASSERTION(NS_SUCCEEDED(rv) || rv == NS_BINDING_ABORTED, "unexpected error writing stream");
         return NS_OK;
     }
 
 
 protected:
+  virtual ~nsMsgProtocolStreamProvider() {}
+
   nsCOMPtr<nsIWeakReference> mMsgProtocol;
   nsCOMPtr<nsIInputStream>  mInStream;
 };
 
 NS_IMPL_ISUPPORTS(nsMsgProtocolStreamProvider,
                               nsIOutputStreamCallback)
 
 class nsMsgFilePostHelper : public nsIStreamListener
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
 
   nsMsgFilePostHelper() { mSuspendedPostFileRead = false;}
   nsresult Init(nsIOutputStream * aOutStream, nsMsgAsyncWriteProtocol * aProtInstance, nsIFile *aFileToPost);
-  virtual ~nsMsgFilePostHelper() {}
   nsCOMPtr<nsIRequest> mPostFileRequest;
   bool mSuspendedPostFileRead;
   void CloseSocket() { mProtInstance = nullptr; }
 protected:
+  virtual ~nsMsgFilePostHelper() {}
   nsCOMPtr<nsIOutputStream> mOutStream;
   nsCOMPtr<nsIWeakReference> mProtInstance;
 };
 
 NS_IMPL_ISUPPORTS(nsMsgFilePostHelper, nsIStreamListener, nsIRequestObserver)
 
 nsresult nsMsgFilePostHelper::Init(nsIOutputStream * aOutStream, nsMsgAsyncWriteProtocol * aProtInstance, nsIFile *aFileToPost)
 {
--- a/mailnews/base/util/nsMsgProtocol.h
+++ b/mailnews/base/util/nsMsgProtocol.h
@@ -46,17 +46,16 @@ class nsIProxyInfo;
 // this will make unification with Necko easier as we'll only have to change
 // this class and not all of the mailnews protocols.
 class NS_MSG_BASE nsMsgProtocol : public nsIStreamListener
                                 , public nsIChannel
                                 , public nsITransportEventSink
 {
 public:
   nsMsgProtocol(nsIURI * aURL);
-  virtual ~nsMsgProtocol();
 
   NS_DECL_THREADSAFE_ISUPPORTS
   // nsIChannel support
   NS_DECL_NSICHANNEL
   NS_DECL_NSIREQUEST
   
   NS_DECL_NSISTREAMLISTENER
   NS_DECL_NSIREQUESTOBSERVER
@@ -71,16 +70,18 @@ public:
   virtual nsresult SetUrl(nsIURI * aURL); // sometimes we want to set the url before we load it
 
   // Flag manipulators
   virtual bool TestFlag  (uint32_t flag) {return flag & m_flags;}
   virtual void   SetFlag   (uint32_t flag) { m_flags |= flag; }
   virtual void   ClearFlag (uint32_t flag) { m_flags &= ~flag; }
 
 protected:
+  virtual ~nsMsgProtocol();
+
   // methods for opening and closing a socket with core netlib....
   // mscott -okay this is lame. I should break this up into a file protocol and a socket based
   // protocool class instead of cheating and putting both methods here...
 
   // open a connection on this url
   virtual nsresult OpenNetworkSocket(nsIURI * aURL,
                                      const char *connectionType,
                                      nsIInterfaceRequestor* callbacks);
@@ -180,17 +181,16 @@ class NS_MSG_BASE nsMsgAsyncWriteProtoco
                                           , public nsSupportsWeakReference
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_IMETHOD Cancel(nsresult status) MOZ_OVERRIDE;
 
   nsMsgAsyncWriteProtocol(nsIURI * aURL);
-  virtual ~nsMsgAsyncWriteProtocol(); 
   
   // temporary over ride...
   virtual nsresult PostMessage(nsIURI* url, nsIFile *postFile) MOZ_OVERRIDE;
   
   // over ride the following methods from the base class
   virtual nsresult SetupTransportState() MOZ_OVERRIDE;
   virtual nsresult SendData(const char * dataBuffer, bool aSuppressLogging = false) MOZ_OVERRIDE;
   nsCString mAsyncBuffer;
@@ -218,16 +218,18 @@ public:
   // we are trying to post. We call these routines when we aren't sending the bits out fast enough
   // to keep up with the file read. 
   nsresult SuspendPostFileRead();
   nsresult ResumePostFileRead(); 
   nsresult UpdateSuspendedReadBytes(uint32_t aNewBytes); 
   void UpdateProgress(uint32_t aNewBytes);
   nsMsgFilePostHelper * mFilePostHelper; // needs to be a weak reference
 protected:
+  virtual ~nsMsgAsyncWriteProtocol();
+
   // the streams for the pipe used to queue up data for the async write calls to the server.
   // we actually re-use the same mOutStream variable in our parent class for the output
   // stream to the socket channel. So no need for a new variable here.
   nsCOMPtr<nsIInputStream>  mInStream;    
   nsCOMPtr<nsIInputStream>  mPostDataStream;
   uint32_t                  mSuspendedReadBytes;   // remaining # of bytes we need to read before   
                                                    // the input stream becomes unblocked
   uint32_t                  mSuspendedReadBytesPostPeriod; // # of bytes which need processed after we insert a '.' before 
--- a/mailnews/base/util/nsMsgTxn.cpp
+++ b/mailnews/base/util/nsMsgTxn.cpp
@@ -72,27 +72,29 @@ NS_IMETHODIMP nsMsgTxn::DeleteProperty(c
   return mPropertyHash.Get(name, nullptr) ? NS_ERROR_FAILURE : NS_OK;
 }
 
 //
 // nsMailSimpleProperty class and impl; used for GetEnumerator
 // This is same as nsSimpleProperty but for external API use.
 //
 
-class nsMailSimpleProperty : public nsIProperty 
+class nsMailSimpleProperty MOZ_FINAL : public nsIProperty 
 {
 public:
   nsMailSimpleProperty(const nsAString& aName, nsIVariant* aValue)
       : mName(aName), mValue(aValue)
   {
   }
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIPROPERTY
 protected:
+  ~nsMailSimpleProperty() {}
+
   nsString mName;
   nsCOMPtr<nsIVariant> mValue;
 };
 
 NS_IMPL_ISUPPORTS(nsMailSimpleProperty, nsIProperty)
 
 NS_IMETHODIMP nsMailSimpleProperty::GetName(nsAString& aName)
 {
--- a/mailnews/base/util/nsMsgTxn.h
+++ b/mailnews/base/util/nsMsgTxn.h
@@ -29,17 +29,16 @@
 #define IMETHOD_VISIBILITY NS_VISIBILITY_DEFAULT
 
 class NS_MSG_BASE nsMsgTxn : public nsITransaction, 
                              public nsIWritablePropertyBag,
                              public nsIWritablePropertyBag2
 {
 public:
     nsMsgTxn();
-    virtual ~nsMsgTxn();
 
     nsresult Init();
 
     NS_IMETHOD DoTransaction(void) MOZ_OVERRIDE;
 
     NS_IMETHOD UndoTransaction(void) MOZ_OVERRIDE = 0;
 
     NS_IMETHOD RedoTransaction(void) MOZ_OVERRIDE = 0;
@@ -54,16 +53,18 @@ public:
  
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSIPROPERTYBAG
     NS_DECL_NSIPROPERTYBAG2
     NS_DECL_NSIWRITABLEPROPERTYBAG
     NS_DECL_NSIWRITABLEPROPERTYBAG2
 
 protected:
+    virtual ~nsMsgTxn();
+
     // a hash table of string -> nsIVariant
     nsInterfaceHashtable<nsStringHashKey, nsIVariant> mPropertyHash;
     nsCOMPtr<nsIMsgWindow> m_msgWindow;
     uint32_t m_txnType;
     nsresult CheckForToggleDelete(nsIMsgFolder *aFolder, const nsMsgKey &aMsgKey, bool *aResult);
 };
 
 #undef  IMETHOD_VISIBILITY
--- a/mailnews/base/util/nsMsgUtils.cpp
+++ b/mailnews/base/util/nsMsgUtils.cpp
@@ -2287,25 +2287,25 @@ MsgStreamMsgHeaders(nsIInputStream *aInp
   return pump->AsyncRead(aConsumer, nullptr);
 }
 
 class CharsetDetectionObserver : public nsICharsetDetectionObserver
 {
 public:
   NS_DECL_ISUPPORTS
   CharsetDetectionObserver() {};
-  virtual ~CharsetDetectionObserver() {};
   NS_IMETHOD Notify(const char* aCharset, nsDetectionConfident aConf)
   {
     mCharset = aCharset;
     return NS_OK;
   };
   const char *GetDetectedCharset() { return mCharset.get(); }
 
 private:
+  virtual ~CharsetDetectionObserver() {}
   nsCString mCharset;
 };
 
 NS_IMPL_ISUPPORTS(CharsetDetectionObserver, nsICharsetDetectionObserver)
 
 NS_MSG_BASE nsresult
 MsgDetectCharsetFromFile(nsIFile *aFile, nsACString &aCharset)
 {
--- a/mailnews/base/util/nsStopwatch.h
+++ b/mailnews/base/util/nsStopwatch.h
@@ -19,18 +19,19 @@
 
 class NS_MSG_BASE nsStopwatch : public nsIStopwatch
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSISTOPWATCH
 
   nsStopwatch();
+private:
   virtual ~nsStopwatch();
-private:
+
   /// Wall-clock start time in seconds since unix epoch.
   double fStartRealTimeSecs;
   /// Wall-clock stop time in seconds since unix epoch.
   double fStopRealTimeSecs;
   /// CPU-clock start time in seconds (of CPU time used since app start)
   double fStartCpuTimeSecs;
   /// CPU-clock stop time in seconds (of CPU time used since app start)
   double fStopCpuTimeSecs;
--- a/mailnews/db/msgdb/public/nsDBFolderInfo.h
+++ b/mailnews/db/msgdb/public/nsDBFolderInfo.h
@@ -27,17 +27,16 @@ class nsMsgDatabase;
 // some sort of dirty mechanism, but I think it turns out that these values will be cached by 
 // the MSG_FolderInfo's anyway.
 class nsDBFolderInfo : public nsIDBFolderInfo
 {
 public:
   friend class nsMsgDatabase;
   
   nsDBFolderInfo(nsMsgDatabase *mdb);
-  virtual ~nsDBFolderInfo();
   
   NS_DECL_ISUPPORTS
     // interface methods.
     NS_DECL_NSIDBFOLDERINFO
     // create the appropriate table and row in a new db.
     nsresult			AddToNewMDB();
   // accessor methods.
   
@@ -65,16 +64,17 @@ public:
   {
     return m_lateredKeys.SizeOfExcludingThis(aMallocSizeOf);
   }
   virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
   {
     return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
   }
 protected:
+  virtual ~nsDBFolderInfo();
 
   // initialize from appropriate table and row in existing db.
   nsresult InitMDBInfo();
   nsresult LoadMemberVariables();
 
   nsresult AdjustHighWater(nsMsgKey highWater, bool force);
 
   void ReleaseExternalReferences(); // let go of any references to other objects.
--- a/mailnews/db/msgdb/public/nsMsgDatabase.h
+++ b/mailnews/db/msgdb/public/nsMsgDatabase.h
@@ -35,38 +35,38 @@ class nsIDBFolderInfo;
 
 const int32_t kMsgDBVersion = 1;
 
 // Hopefully we're not opening up lots of databases at the same time, however
 // this will give us a buffer before we need to start reallocating the cache
 // array.
 const uint32_t kInitialMsgDBCacheSize = 20;
 
-class nsMsgDBService : public nsIMsgDBService
+class nsMsgDBService MOZ_FINAL : public nsIMsgDBService
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGDBSERVICE
 
   nsMsgDBService();
-  ~nsMsgDBService();
 
   void AddToCache(nsMsgDatabase* pMessageDB);
   void DumpCache();
   void EnsureCached(nsMsgDatabase* pMessageDB)
   {
     if (!m_dbCache.Contains(pMessageDB))
       m_dbCache.AppendElement(pMessageDB);
   }
   void RemoveFromCache(nsMsgDatabase* pMessageDB)
   {
     m_dbCache.RemoveElement(pMessageDB);
   }
 
 protected:
+  ~nsMsgDBService();
   void HookupPendingListeners(nsIMsgDatabase *db, nsIMsgFolder *folder);
   void FinishDBOpen(nsIMsgFolder *aFolder, nsMsgDatabase *aMsgDB);
   nsMsgDatabase* FindInCache(nsIFile *dbName);
 
   nsCOMArray <nsIMsgFolder> m_foldersPendingListeners;
   nsCOMArray <nsIDBChangeListener> m_pendingListeners;
   nsAutoTArray<nsMsgDatabase*, kInitialMsgDBCacheSize> m_dbCache;
 };
@@ -79,18 +79,16 @@ public:
     NS_DECL_NSISIMPLEENUMERATOR
 
     // nsMsgDBEnumerator methods:
     typedef nsresult (*nsMsgDBEnumeratorFilter)(nsIMsgDBHdr* hdr, void* closure);
 
     nsMsgDBEnumerator(nsMsgDatabase* db, nsIMdbTable *table,
                       nsMsgDBEnumeratorFilter filter, void* closure,
                       bool iterateForwards = true);
-    virtual ~nsMsgDBEnumerator();
-
     void Clear();
 
     nsresult                        GetRowCursor();
     virtual nsresult                PrefetchNext();
     nsRefPtr<nsMsgDatabase>         mDB;
     nsCOMPtr<nsIMdbTableRowCursor>  mRowCursor;
     mdb_pos                         mRowPos;
     nsCOMPtr<nsIMsgDBHdr>           mResultHdr;
@@ -98,16 +96,19 @@ public:
     bool                            mNextPrefetched;
     bool                            mIterateForwards;
     nsMsgDBEnumeratorFilter         mFilter;
     nsCOMPtr <nsIMdbTable>          mTable;
     void*                           mClosure;
     // This is used when the caller wants to limit how many headers the
     // enumerator looks at in any given time slice.
     mdb_pos                         mStopPos;
+
+protected:
+    virtual ~nsMsgDBEnumerator();
 };
 
 class nsMsgFilteredDBEnumerator : public nsMsgDBEnumerator
 {
 public:
   nsMsgFilteredDBEnumerator(nsMsgDatabase* db, nsIMdbTable *table,
                             bool reverse, nsIArray *searchTerms);
   virtual ~nsMsgFilteredDBEnumerator();
@@ -167,17 +168,16 @@ public:
   virtual nsresult EnumerateMessagesWithFlag(nsISimpleEnumerator* *result, uint32_t *pFlag);
   nsresult         GetSearchResultsTable(const char *searchFolderUri, bool createIfMissing, nsIMdbTable **table);
 
   // this might just be for debugging - we'll see.
   nsresult ListAllThreads(nsTArray<nsMsgKey> *threadIds);
   //////////////////////////////////////////////////////////////////////////////
   // nsMsgDatabase methods:
   nsMsgDatabase();
-  virtual ~nsMsgDatabase();
 
   void GetMDBFactory(nsIMdbFactory ** aMdbFactory);
   nsIMdbEnv             *GetEnv() {return m_mdbEnv;}
   nsIMdbStore           *GetStore() {return m_mdbStore;}
   virtual uint32_t      GetCurVersion();
   nsresult              GetCollationKeyGenerator();
   nsIMimeConverter *    GetMimeConverter();
 
@@ -231,16 +231,18 @@ public:
   nsresult DumpMsgChildren(nsIMsgDBHdr *msgHdr);
 #endif
   
   friend class nsMsgHdr;  // use this to get access to cached tokens for hdr fields
   friend class nsMsgThread;  // use this to get access to cached tokens for hdr fields
   friend class nsMsgDBEnumerator;
   friend class nsMsgDBThreadEnumerator;
 protected:
+  virtual ~nsMsgDatabase();
+
   // prefs stuff - in future, we might want to cache the prefs interface
   nsresult        GetBoolPref(const char *prefName, bool *result);
   nsresult        GetIntPref(const char *prefName, int32_t *result);
   virtual void    GetGlobalPrefs();
     // retrieval methods
   nsIMsgThread *  GetThreadForReference(nsCString &msgID, nsIMsgDBHdr **pMsgHdr);
   nsIMsgThread *  GetThreadForSubject(nsCString &subject);
   nsIMsgThread *  GetThreadForMessageId(nsCString &msgId);
@@ -427,39 +429,39 @@ private:
   uint32_t m_cacheSize;
   nsRefPtr<mozilla::mailnews::MsgDBReporter> mMemReporter;
 };
 
 class nsMsgRetentionSettings : public nsIMsgRetentionSettings
 {
 public:
   nsMsgRetentionSettings();
-  virtual ~nsMsgRetentionSettings();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGRETENTIONSETTINGS
 protected:
+  virtual ~nsMsgRetentionSettings();
   nsMsgRetainByPreference m_retainByPreference;
   uint32_t                m_daysToKeepHdrs;
   uint32_t                m_numHeadersToKeep;
   bool                    m_keepUnreadMessagesOnly;
   bool                    m_useServerDefaults;
   bool                    m_cleanupBodiesByDays;
   uint32_t                m_daysToKeepBodies;
   bool                    m_applyToFlaggedMessages;
 };
 
 class nsMsgDownloadSettings : public nsIMsgDownloadSettings
 {
 public:
   nsMsgDownloadSettings();
-  virtual ~nsMsgDownloadSettings();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGDOWNLOADSETTINGS
 protected:
+  virtual ~nsMsgDownloadSettings();
   bool m_useServerDefaults;
   bool m_downloadUnreadOnly;
   bool m_downloadByDate;
   int32_t m_ageLimitOfMsgsToDownload;
 };
 
 #endif
--- a/mailnews/db/msgdb/public/nsMsgHdr.h
+++ b/mailnews/db/msgdb/public/nsMsgHdr.h
@@ -21,17 +21,16 @@ class nsMsgHdr : public nsIMsgDBHdr {
 public:
     NS_DECL_NSIMSGDBHDR
 	friend class nsMsgDatabase;
     friend class nsMsgPropertyEnumerator; // accesses m_mdb
     ////////////////////////////////////////////////////////////////////////////
     ////////////////////////////////////////////////////////////////////////////
     // nsMsgHdr methods:
     nsMsgHdr(nsMsgDatabase *db, nsIMdbRow *dbRow);
-    virtual ~nsMsgHdr();
 
     virtual nsresult    GetRawFlags(uint32_t *result);
     void                Init();
     virtual nsresult    InitCachedValues();
     virtual nsresult    InitFlags();
     void                ClearCachedValues() {m_initedValues = 0;}
 
     NS_DECL_ISUPPORTS
@@ -47,16 +46,17 @@ public:
       return m_references.SizeOfExcludingThis(aMallocSizeOfFun);
     }
     size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOfFun) const
     {
       return aMallocSizeOfFun(this) + SizeOfExcludingThis(aMallocSizeOfFun);
     }
 
 protected:
+  virtual ~nsMsgHdr();
     nsresult SetStringColumn(const char *str, mdb_token token);
     nsresult SetUInt32Column(uint32_t value, mdb_token token);
     nsresult GetUInt32Column(mdb_token token, uint32_t *pvalue, uint32_t defaultValue = 0);
     nsresult SetUInt64Column(uint64_t value, mdb_token token);
     nsresult GetUInt64Column(mdb_token token, uint64_t *pvalue, uint64_t defaultValue = 0);
 
     // reference and threading stuff.
     nsresult	ParseReferences(const char *references);
--- a/mailnews/db/msgdb/public/nsMsgThread.h
+++ b/mailnews/db/msgdb/public/nsMsgThread.h
@@ -15,27 +15,27 @@
 class nsIMdbTable;
 class nsIMsgDBHdr;
 class nsMsgDatabase;
 
 class nsMsgThread : public nsIMsgThread {
 public:
   nsMsgThread();
   nsMsgThread(nsMsgDatabase *db, nsIMdbTable *table);
-  virtual ~nsMsgThread();
 
   friend class nsMsgThreadEnumerator;
   friend class nsMsgDatabase;
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGTHREAD
 
   nsRefPtr<nsMsgDatabase> m_mdbDB;
 
 protected:
+  virtual ~nsMsgThread();
 
   void                  Init();
   void                  Clear();
   virtual nsresult      InitCachedValues();
   nsresult              ChangeChildCount(int32_t delta);
   nsresult              ChangeUnreadChildCount(int32_t delta);
   nsresult              RemoveChild(nsMsgKey msgKey);
   nsresult              SetThreadRootKey(nsMsgKey threadRootKey);
--- a/mailnews/db/msgdb/src/nsDBFolderInfo.cpp
+++ b/mailnews/db/msgdb/src/nsDBFolderInfo.cpp
@@ -53,16 +53,17 @@ static nsIObserver *gFolderCharsetObserv
 // observer for charset related preference notification
 class nsFolderCharsetObserver : public nsIObserver {
 
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIOBSERVER
 
   nsFolderCharsetObserver() { }
+private:
   virtual ~nsFolderCharsetObserver() {}
 };
 
 NS_IMPL_ISUPPORTS(nsFolderCharsetObserver, nsIObserver)
 
 NS_IMETHODIMP nsFolderCharsetObserver::Observe(nsISupports *aSubject, const char *aTopic, const char16_t *someData)
 {
   nsresult rv;
--- a/mailnews/db/msgdb/src/nsMailDatabase.cpp
+++ b/mailnews/db/msgdb/src/nsMailDatabase.cpp
@@ -314,19 +314,19 @@ void nsMailDatabase::SetReparse(bool rep
 class nsMsgOfflineOpEnumerator : public nsISimpleEnumerator {
 public:
   NS_DECL_ISUPPORTS
 
   // nsISimpleEnumerator methods:
   NS_DECL_NSISIMPLEENUMERATOR
 
   nsMsgOfflineOpEnumerator(nsMailDatabase* db);
-  virtual ~nsMsgOfflineOpEnumerator();
 
 protected:
+  virtual ~nsMsgOfflineOpEnumerator();
   nsresult					GetRowCursor();
   nsresult					PrefetchNext();
   nsMailDatabase*              mDB;
   nsIMdbTableRowCursor*       mRowCursor;
   nsCOMPtr <nsIMsgOfflineImapOperation> mResultOp;
   bool              mDone;
   bool						mNextPrefetched;
 };
--- a/mailnews/db/msgdb/src/nsMsgDatabase.cpp
+++ b/mailnews/db/msgdb/src/nsMsgDatabase.cpp
@@ -1072,16 +1072,19 @@ public:
         MsgReplaceChar(folderURL, '/', '\\');
         memoryPath += folderURL;
       }
     } else {
       memoryPath.AppendLiteral("UNKNOWN-FOLDER");
     }
     memoryPath.Append(')');
   }
+
+private:
+  ~MsgDBReporter() {}
 };
 
 NS_IMPL_ISUPPORTS(MsgDBReporter, nsIMemoryReporter)
 }
 }
 
 nsMsgDatabase::nsMsgDatabase()
         : m_dbFolderInfo(nullptr),
@@ -3200,19 +3203,19 @@ public:
     NS_DECL_NSISIMPLEENUMERATOR
 
     NS_DECL_NSIDBCHANGELISTENER
 
     // nsMsgDBEnumerator methods:
     typedef nsresult (*nsMsgDBThreadEnumeratorFilter)(nsIMsgThread* thread);
 
     nsMsgDBThreadEnumerator(nsMsgDatabase* db, nsMsgDBThreadEnumeratorFilter filter);
-    virtual ~nsMsgDBThreadEnumerator();
 
 protected:
+    virtual ~nsMsgDBThreadEnumerator();
     nsresult          GetTableCursor(void);
     nsresult          PrefetchNext();
     nsMsgDatabase*              mDB;
     nsCOMPtr <nsIMdbPortTableCursor>  mTableCursor;
     nsIMsgThread*                 mResultThread;
     bool                        mDone;
     bool              mNextPrefetched;
     nsMsgDBThreadEnumeratorFilter     mFilter;
--- a/mailnews/db/msgdb/src/nsMsgHdr.cpp
+++ b/mailnews/db/msgdb/src/nsMsgHdr.cpp
@@ -987,20 +987,20 @@ NS_IMETHODIMP nsMsgHdr::GetIsKilled(bool
 #define NULL_MORK_COLUMN 0
 class nsMsgPropertyEnumerator : public nsIUTF8StringEnumerator
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIUTF8STRINGENUMERATOR
 
   nsMsgPropertyEnumerator(nsMsgHdr* aHdr);
-  virtual ~nsMsgPropertyEnumerator();
   void PrefetchNext();
 
 protected:
+  virtual ~nsMsgPropertyEnumerator();
   nsCOMPtr<nsIMdbRowCellCursor> mRowCellCursor;
   nsCOMPtr<nsIMdbEnv> m_mdbEnv;
   nsCOMPtr<nsIMdbStore> m_mdbStore;
   // Hold a reference to the hdr so it will hold an xpcom reference to the
   // underlying mdb row. The row cell cursor will crash if the underlying
   // row goes away.
   nsRefPtr<nsMsgHdr> m_hdr;
   bool mNextPrefetched;
--- a/mailnews/db/msgdb/src/nsMsgOfflineImapOperation.h
+++ b/mailnews/db/msgdb/src/nsMsgOfflineImapOperation.h
@@ -9,26 +9,26 @@
 #include "nsMsgDatabase.h"
 #include "prlog.h"
 
 class nsMsgOfflineImapOperation : public nsIMsgOfflineImapOperation
 {
 public:
   /** Instance Methods **/
   nsMsgOfflineImapOperation(nsMsgDatabase *db, nsIMdbRow *row);
-  virtual   ~nsMsgOfflineImapOperation();
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGOFFLINEIMAPOPERATION
 
 
   nsIMdbRow   *GetMDBRow() {return m_mdbRow;}
   nsresult    GetCopiesFromDB();
   nsresult    SetCopiesToDB();
   void        Log(PRLogModuleInfo *logFile);
 protected:
+  virtual ~nsMsgOfflineImapOperation();
   nsresult AddKeyword(const char *aKeyword, nsCString &addList, const char *addProp,
                       nsCString &removeList, const char *removeProp);
 
   nsOfflineImapOperationType m_operation;
   nsMsgKey          m_messageKey;
   nsMsgKey          m_sourceMessageKey;
   uint32_t          m_operationFlags; // what to do on sync
   imapMessageFlagsType m_newFlags; // used for kFlagsChanged
--- a/mailnews/db/msgdb/src/nsMsgThread.cpp
+++ b/mailnews/db/msgdb/src/nsMsgThread.cpp
@@ -602,19 +602,19 @@ public:
   NS_DECL_NSISIMPLEENUMERATOR
 
   // nsMsgThreadEnumerator methods:
   typedef nsresult (*nsMsgThreadEnumeratorFilter)(nsIMsgDBHdr* hdr, void* closure);
 
   nsMsgThreadEnumerator(nsMsgThread *thread, nsMsgKey startKey,
   nsMsgThreadEnumeratorFilter filter, void* closure);
   int32_t MsgKeyFirstChildIndex(nsMsgKey inMsgKey);
-  virtual ~nsMsgThreadEnumerator();
 
 protected:
+  virtual ~nsMsgThreadEnumerator();
 
   nsresult                Prefetch();
 
   nsIMdbTableRowCursor*   mRowCursor;
   nsCOMPtr <nsIMsgDBHdr>  mResultHdr;
   nsMsgThread*            mThread;
   nsMsgKey                mThreadParentKey;
   nsMsgKey                mFirstMsgKey;
--- a/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp
+++ b/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp
@@ -955,18 +955,18 @@ public:
 class TokenStreamListener : public nsIStreamListener, nsIMsgHeaderSink {
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIREQUESTOBSERVER
     NS_DECL_NSISTREAMLISTENER
     NS_DECL_NSIMSGHEADERSINK
 
     TokenStreamListener(TokenAnalyzer* analyzer);
+protected:
     virtual ~TokenStreamListener();
-protected:
     TokenAnalyzer* mAnalyzer;
     char* mBuffer;
     uint32_t mBufferSize;
     uint32_t mLeftOverCount;
     Tokenizer mTokenizer;
     bool mSetAttachmentFlag;
 };
 
--- a/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.h
+++ b/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.h
@@ -350,17 +350,16 @@ class nsBayesianFilter : public nsIJunkM
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIMSGFILTERPLUGIN
     NS_DECL_NSIJUNKMAILPLUGIN
     NS_DECL_NSIMSGCORPUS
     NS_DECL_NSIOBSERVER
 
     nsBayesianFilter();
-    virtual ~nsBayesianFilter();
 
     nsresult Init();
 
     nsresult tokenizeMessage(const char* messageURI, nsIMsgWindow *aMsgWindow, TokenAnalyzer* analyzer);
     void classifyMessage(Tokenizer& tokens, const char* messageURI,
                         nsIJunkMailClassificationListener* listener);
 
     void classifyMessage(
@@ -375,16 +374,17 @@ public:
     void observeMessage(Tokenizer& tokens, const char* messageURI,
                         nsTArray<uint32_t>& oldClassifications,
                         nsTArray<uint32_t>& newClassifications,
                         nsIJunkMailClassificationListener* listener,
                         nsIMsgTraitClassificationListener* aTraitListener);
 
 
 protected:
+    virtual ~nsBayesianFilter();
 
     static void TimerCallback(nsITimer* aTimer, void* aClosure);
 
     CorpusStore mCorpus;
     double   mJunkProbabilityThreshold;
     int32_t mMaximumTokenCount;
     bool mTrainingDataDirty;
     int32_t mMinFlushInterval; // in milliseconds, must be positive
--- a/mailnews/extensions/mailviews/src/nsMsgMailViewList.h
+++ b/mailnews/extensions/mailviews/src/nsMsgMailViewList.h
@@ -19,35 +19,35 @@
 // a mail View is just a name and an array of search terms
 class nsMsgMailView : public nsIMsgMailView
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGMAILVIEW
 
   nsMsgMailView();
-  virtual ~nsMsgMailView();
 
 protected:
+  virtual ~nsMsgMailView();
   nsString mName;
   nsCOMPtr<nsIStringBundle> mBundle;
   nsCOMPtr<nsISupportsArray> mViewSearchTerms;
 };
 
 
 class nsMsgMailViewList : public nsIMsgMailViewList
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGMAILVIEWLIST
 
   nsMsgMailViewList();
-  virtual ~nsMsgMailViewList();
 
 protected:
+  virtual ~nsMsgMailViewList();
   nsresult LoadMailViews(); // reads in user defined mail views from our default file
   nsresult ConvertFilterListToMailViews();
   nsresult ConvertMailViewListToFilterList();
 
   nsCOMArray<nsIMsgMailView> m_mailViews;
   nsCOMPtr<nsIMsgFilterList> mFilterList; // our internal filter list representation
 };
 
--- a/mailnews/extensions/mdn/src/nsMsgMdnGenerator.h
+++ b/mailnews/extensions/mdn/src/nsMsgMdnGenerator.h
@@ -26,19 +26,20 @@
 class nsMsgMdnGenerator : public nsIMsgMdnGenerator, public nsIUrlListener
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGMDNGENERATOR
   NS_DECL_NSIURLLISTENER
 
   nsMsgMdnGenerator();
+
+private:
   virtual ~nsMsgMdnGenerator();
 
-private:
   // Sanity Check methods
   bool ProcessSendMode(); // must called prior ValidateReturnPath
   bool ValidateReturnPath();
   bool NotInToOrCc();
   bool MailAddrMatch(const char *addr1, const char *addr2);
 
   nsresult StoreMDNSentFlag(nsIMsgFolder *folder, nsMsgKey key);
   nsresult ClearMDNNeededFlag(nsIMsgFolder *folder, nsMsgKey key);
--- a/mailnews/extensions/smime/src/nsEncryptedSMIMEURIsService.h
+++ b/mailnews/extensions/smime/src/nsEncryptedSMIMEURIsService.h
@@ -11,15 +11,15 @@
 
 class nsEncryptedSMIMEURIsService : public nsIEncryptedSMIMEURIsService
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIENCRYPTEDSMIMEURISSERVICE
 
   nsEncryptedSMIMEURIsService();
-  virtual ~nsEncryptedSMIMEURIsService();
 
 protected:
+  virtual ~nsEncryptedSMIMEURIsService();
   nsTArray<nsCString> mEncryptedURIs;
 };
 
 #endif
--- a/mailnews/extensions/smime/src/nsMsgComposeSecure.h
+++ b/mailnews/extensions/smime/src/nsMsgComposeSecure.h
@@ -28,19 +28,19 @@ class MimeEncoder;
 
 class nsMsgSMIMEComposeFields : public nsIMsgSMIMECompFields
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGSMIMECOMPFIELDS
 
   nsMsgSMIMEComposeFields();
-  virtual ~nsMsgSMIMEComposeFields();
 
 private:
+  virtual ~nsMsgSMIMEComposeFields();
   bool mSignMessage;
   bool mAlwaysEncryptMessage;
 };
 
 typedef enum {
   mime_crypto_none,				/* normal unencapsulated MIME message */
   mime_crypto_clear_signed,		/* multipart/signed encapsulation */
   mime_crypto_opaque_signed,	/* application/x-pkcs7-mime (signedData) */
@@ -50,20 +50,20 @@ typedef enum {
 
 class nsMsgComposeSecure : public nsIMsgComposeSecure
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGCOMPOSESECURE
 
   nsMsgComposeSecure();
-  virtual ~nsMsgComposeSecure();
   /* additional members */
   void GetOutputStream(nsIOutputStream **stream) { NS_IF_ADDREF(*stream = mStream);}
 private:
+  virtual ~nsMsgComposeSecure();
   typedef mozilla::mailnews::MimeEncoder MimeEncoder;
   nsresult MimeInitMultipartSigned(bool aOuter, nsIMsgSendReport *sendReport);
   nsresult MimeInitEncryption(bool aSign, nsIMsgSendReport *sendReport);
   nsresult MimeFinishMultipartSigned (bool aOuter, nsIMsgSendReport *sendReport);
   nsresult MimeFinishEncryption (bool aSign, nsIMsgSendReport *sendReport);
   nsresult MimeCryptoHackCerts(const char *aRecipients, nsIMsgSendReport *sendReport, bool aEncrypt, bool aSign);
   bool InitializeSMIMEBundle();
   nsresult GetSMIMEBundleString(const char16_t *name,
--- a/mailnews/extensions/smime/src/nsSMimeJSHelper.h
+++ b/mailnews/extensions/smime/src/nsSMimeJSHelper.h
@@ -11,16 +11,16 @@
 
 class nsSMimeJSHelper : public nsISMimeJSHelper
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSISMIMEJSHELPER
 
   nsSMimeJSHelper();
-  virtual ~nsSMimeJSHelper();
 
 private:
+  virtual ~nsSMimeJSHelper();
   nsresult getMailboxList(nsIMsgCompFields *compFields,
     nsTArray<nsCString> &mailboxes);
 };
 
 #endif
--- a/mailnews/imap/src/nsIMAPBodyShell.h
+++ b/mailnews/imap/src/nsIMAPBodyShell.h
@@ -211,17 +211,16 @@ class nsIMAPMessagePartIDArray;
 
 class nsIMAPBodyShell : public nsISupports
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   nsIMAPBodyShell(nsImapProtocol *protocolConnection,
                   nsIMAPBodypartMessage *message, uint32_t UID,
                   const char *folderName);
-  virtual ~nsIMAPBodyShell();
   // To be used after a shell is uncached
   void SetConnection(nsImapProtocol *con) { m_protocolConnection = con; }
   virtual bool GetIsValid() { return m_isValid; }
   virtual void SetIsValid(bool valid);
 
   // Prefetch
   // Adds a message body part to the queue to be prefetched
   // in a single, pipelined command
@@ -263,16 +262,17 @@ public:
   // so we don't re-enter
   bool IsBeingGenerated() { return m_isBeingGenerated; }
   bool IsShellCached() { return m_cached; }
   void SetIsCached(bool isCached) { m_cached = isCached; }
   bool GetGeneratingWholeMessage() { return m_generatingWholeMessage; }
   IMAP_ContentModifiedType	GetContentModified() { return m_contentModified; }
   void SetContentModified(IMAP_ContentModifiedType modType) { m_contentModified = modType; }
 protected:
+  virtual ~nsIMAPBodyShell();
 
   nsIMAPBodypartMessage *m_message;
 
   nsIMAPMessagePartIDArray        *m_prefetchQueue; // array of pipelined part prefetches.  Ok, so it's not really a queue.
 
   bool                            m_isValid;
   nsImapProtocol                  *m_protocolConnection;  // Connection, for filling in parts
   nsCString                       m_UID;                  // UID of this message
--- a/mailnews/imap/src/nsIMAPHostSessionList.h
+++ b/mailnews/imap/src/nsIMAPHostSessionList.h
@@ -48,17 +48,16 @@ protected:
 // this is an interface to a linked list of host info's    
 class nsIMAPHostSessionList : public nsIImapHostSessionList, public nsIObserver, public nsSupportsWeakReference
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIOBSERVER  
 
   nsIMAPHostSessionList();
-  virtual ~nsIMAPHostSessionList();
   nsresult Init();
   // Host List
   NS_IMETHOD AddHostToList(const char *serverKey, 
                             nsIImapIncomingServer *server) MOZ_OVERRIDE;
   NS_IMETHOD ResetAll() MOZ_OVERRIDE;
 
   // Capabilities
   NS_IMETHOD GetHostHasAdminURL(const char *serverKey, bool &result) MOZ_OVERRIDE;
@@ -122,14 +121,15 @@ public:
 
   // Message Body Shells
   NS_IMETHOD AddShellToCacheForHost(const char *serverKey, nsIMAPBodyShell *shell) MOZ_OVERRIDE;
   NS_IMETHOD FindShellInCacheForHost(const char *serverKey, const char *mailboxName, const char *UID, IMAP_ContentModifiedType modType, nsIMAPBodyShell	**result) MOZ_OVERRIDE;
   NS_IMETHOD ClearShellCacheForHost(const char *serverKey) MOZ_OVERRIDE;
   PRMonitor *gCachedHostInfoMonitor;
   nsIMAPHostInfo *fHostInfoList;
 protected:
+  virtual ~nsIMAPHostSessionList();
   nsresult SetNamespacesPrefForHost(nsIImapIncomingServer *aHost,
                                     EIMAPNamespaceType type,
                                     const char *pref);
   nsIMAPHostInfo *FindHost(const char *serverKey);
 };
 #endif
--- a/mailnews/imap/src/nsImapFlagAndUidState.h
+++ b/mailnews/imap/src/nsImapFlagAndUidState.h
@@ -16,31 +16,31 @@ const int32_t kImapFlagAndUidStateSize =
 #include "nsBaseHashtable.h"
 #include "nsDataHashtable.h"
 
 class nsImapFlagAndUidState : public nsIImapFlagAndUidState
 {
 public:
     NS_DECL_THREADSAFE_ISUPPORTS
     nsImapFlagAndUidState(int numberOfMessages);
-    virtual ~nsImapFlagAndUidState();
 
     NS_DECL_NSIIMAPFLAGANDUIDSTATE
 
     int32_t               NumberOfDeletedMessages();
     
     imapMessageFlagsType  GetMessageFlagsFromUID(uint32_t uid, bool *foundIt, int32_t *ndx);
 
     bool         IsLastMessageUnseen(void);
     bool         GetPartialUIDFetch() {return fPartialUIDFetch;}
     void         SetPartialUIDFetch(bool isPartial) {fPartialUIDFetch = isPartial;}
     uint32_t     GetHighestNonDeletedUID();
     uint16_t     GetSupportedUserFlags() { return fSupportedUserFlags; }
 
 private:
+  virtual ~nsImapFlagAndUidState();
 
   static PLDHashOperator FreeCustomFlags(const uint32_t &aKey, char *aData, void *closure);
     nsTArray<nsMsgKey>      fUids;
     nsTArray<imapMessageFlagsType> fFlags;
     // Hash table, mapping uids to extra flags
     nsDataHashtable<nsUint32HashKey, nsCString> m_customFlagsHash;
     // Hash table, mapping UID+customAttributeName to customAttributeValue.
     nsDataHashtable<nsCStringHashKey, nsCString> m_customAttributesHash;
--- a/mailnews/imap/src/nsImapMailFolder.cpp
+++ b/mailnews/imap/src/nsImapMailFolder.cpp
@@ -6330,24 +6330,25 @@ NS_IMETHODIMP nsImapMailFolder::GetOther
 }
 
 class AdoptUTF8StringEnumerator MOZ_FINAL : public nsIUTF8StringEnumerator
 {
 public:
   AdoptUTF8StringEnumerator(nsTArray<nsCString>* array) :
     mStrings(array), mIndex(0)
   {}
-  ~AdoptUTF8StringEnumerator()
-  {
-    delete mStrings;
-  }
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIUTF8STRINGENUMERATOR
 private:
+  ~AdoptUTF8StringEnumerator()
+  {
+    delete mStrings;
+  }
+
   nsTArray<nsCString>* mStrings;
   uint32_t             mIndex;
 };
 
 NS_IMPL_ISUPPORTS(AdoptUTF8StringEnumerator, nsIUTF8StringEnumerator)
 
 NS_IMETHODIMP
 AdoptUTF8StringEnumerator::HasMore(bool *aResult)
@@ -7675,25 +7676,25 @@ done:
   return rv;
 }
 
 class nsImapFolderCopyState MOZ_FINAL : public nsIUrlListener, public nsIMsgCopyServiceListener
 {
 public:
   nsImapFolderCopyState(nsIMsgFolder *destParent, nsIMsgFolder *srcFolder,
                     bool isMoveFolder, nsIMsgWindow *msgWindow, nsIMsgCopyServiceListener *listener);
-  ~nsImapFolderCopyState();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIURLLISTENER
   NS_DECL_NSIMSGCOPYSERVICELISTENER
 
   nsresult StartNextCopy();
   nsresult AdvanceToNextFolder(nsresult aStatus);
 protected:
+  ~nsImapFolderCopyState();
   nsRefPtr<nsImapMailFolder> m_newDestFolder;
   nsCOMPtr<nsISupports> m_origSrcFolder;
   nsCOMPtr<nsIMsgFolder> m_curDestParent;
   nsCOMPtr<nsIMsgFolder> m_curSrcFolder;
   bool                    m_isMoveFolder;
   nsCOMPtr<nsIMsgCopyServiceListener> m_copySrvcListener;
   nsCOMPtr<nsIMsgWindow> m_msgWindow;
   int32_t                 m_childIndex;
--- a/mailnews/imap/src/nsImapMailFolder.h
+++ b/mailnews/imap/src/nsImapMailFolder.h
@@ -49,17 +49,16 @@ class nsIMsgOfflineImapOperation;
 class nsImapMailCopyState: public nsISupports
 {
 public:
     NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMAPMAILCOPYSTATE_IID)
 
     NS_DECL_THREADSAFE_ISUPPORTS
 
     nsImapMailCopyState();
-    virtual ~nsImapMailCopyState();
 
     nsCOMPtr<nsISupports> m_srcSupport; // source file spec or folder
     nsCOMPtr<nsIArray> m_messages; // array of source messages
     nsRefPtr<nsImapMoveCopyMsgTxn> m_undoMsgTxn; // undo object with this copy operation
     nsCOMPtr<nsIMsgDBHdr> m_message; // current message to be copied
     nsCOMPtr<nsIMsgCopyServiceListener> m_listener; // listener of this copy
                                                     // operation
     nsCOMPtr<nsIFile> m_tmpFile; // temp file spec for copy operation
@@ -81,16 +80,19 @@ public:
     uint32_t m_leftOver;
     bool m_allowUndo;
     bool m_eatLF;
     uint32_t m_newMsgFlags; // only used if there's no m_message
     nsCString m_newMsgKeywords; // ditto 
     // If the server supports UIDPLUS, this is the UID for the append,
     // if we're doing an append.
     nsMsgKey m_appendUID;
+
+private:
+    virtual ~nsImapMailCopyState();
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(nsImapMailCopyState, NS_IMAPMAILCOPYSTATE_IID)
 
 // ACLs for this folder.
 // Generally, we will try to always query this class when performing
 // an operation on the folder.
 // If the server doesn't support ACLs, none of this data will be filled in.
@@ -192,17 +194,16 @@ class nsImapMailFolder :  public nsMsgDB
                           public nsIImapMailFolderSink,
                           public nsIImapMessageSink,
                           public nsICopyMessageListener,
                           public nsIMsgFilterHitNotify
 {
  static const uint32_t PLAYBACK_TIMER_INTERVAL_IN_MS = 500; 
 public:
   nsImapMailFolder();
-  virtual ~nsImapMailFolder();
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIMsgFolder methods:
   NS_IMETHOD GetSubFolders(nsISimpleEnumerator **aResult) MOZ_OVERRIDE;
 
   NS_IMETHOD GetMessages(nsISimpleEnumerator* *result) MOZ_OVERRIDE;
   NS_IMETHOD UpdateFolder(nsIMsgWindow *aWindow) MOZ_OVERRIDE;
@@ -338,16 +339,17 @@ public:
   // these might end up as an nsIImapMailFolder attribute.
   nsresult SetSupportedUserFlags(uint32_t userFlags);
   nsresult GetSupportedUserFlags(uint32_t *userFlags);
 
   // Find the start of a range of msgKeys that can hold srcCount headers.
   nsresult FindOpenRange(nsMsgKey &fakeBase, uint32_t srcCount);
 
 protected:
+  virtual ~nsImapMailFolder();
   // Helper methods
 
   virtual nsresult CreateChildFromURI(const nsCString &uri, nsIMsgFolder **folder) MOZ_OVERRIDE;
   void FindKeysToAdd(const nsTArray<nsMsgKey> &existingKeys, nsTArray<nsMsgKey>
     &keysToFetch, uint32_t &numNewUnread, nsIImapFlagAndUidState *flagState);
   void FindKeysToDelete(const nsTArray<nsMsgKey> &existingKeys, nsTArray<nsMsgKey>
     &keysToFetch, nsIImapFlagAndUidState *flagState, uint32_t boxFlags);
   void PrepareToAddHeadersToMailDB(nsIImapProtocol* aProtocol);
--- a/mailnews/imap/src/nsImapOfflineSync.h
+++ b/mailnews/imap/src/nsImapOfflineSync.h
@@ -19,33 +19,33 @@
 class nsImapOfflineSync : public nsIUrlListener,
                           public nsIMsgCopyServiceListener,
                           public nsIDBChangeListener {
 public: // set to one folder to playback one folder only
   nsImapOfflineSync(nsIMsgWindow *window, nsIUrlListener *listener,
                     nsIMsgFolder *singleFolderOnly = nullptr,
                     bool isPseudoOffline = false);
 
-  virtual ~nsImapOfflineSync();
-
   NS_DECL_ISUPPORTS
   NS_DECL_NSIURLLISTENER
   NS_DECL_NSIMSGCOPYSERVICELISTENER
   NS_DECL_NSIDBCHANGELISTENER
   virtual nsresult  ProcessNextOperation(); // this kicks off playback
 
   int32_t   GetCurrentUIDValidity();
   void      SetCurrentUIDValidity(int32_t uidvalidity) { mCurrentUIDValidity = uidvalidity; }
 
   void      SetPseudoOffline(bool pseudoOffline) {m_pseudoOffline = pseudoOffline;}
   bool      ProcessingStaleFolderUpdate() { return m_singleFolderToUpdate != nullptr; }
 
   bool      CreateOfflineFolder(nsIMsgFolder *folder);
   void      SetWindow(nsIMsgWindow *window);
 protected:
+  virtual ~nsImapOfflineSync();
+
   bool      CreateOfflineFolders();
   bool      DestFolderOnSameServer(nsIMsgFolder *destFolder);
   bool      AdvanceToNextServer();
   bool      AdvanceToNextFolder();
   void      AdvanceToFirstIMAPFolder();
   void      DeleteAllOfflineOpsForCurrentDB();
   void      ClearCurrentOps();
   // Clears m_currentDB, and unregister listener.
--- a/mailnews/imap/src/nsImapProtocol.cpp
+++ b/mailnews/imap/src/nsImapProtocol.cpp
@@ -8596,20 +8596,20 @@ bool nsImapProtocol::UseCompressDeflate(
 class nsImapCacheStreamListener : public nsIStreamListener
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
 
   nsImapCacheStreamListener ();
-  virtual ~nsImapCacheStreamListener();
 
   nsresult Init(nsIStreamListener * aStreamListener, nsIImapMockChannel * aMockChannelToUse);
 protected:
+  virtual ~nsImapCacheStreamListener();
   nsCOMPtr<nsIImapMockChannel> mChannelToUse;
   nsCOMPtr<nsIStreamListener> mListener;
 };
 
 NS_IMPL_ADDREF(nsImapCacheStreamListener)
 NS_IMPL_RELEASE(nsImapCacheStreamListener)
 
 NS_INTERFACE_MAP_BEGIN(nsImapCacheStreamListener)
--- a/mailnews/imap/src/nsImapProtocol.h
+++ b/mailnews/imap/src/nsImapProtocol.h
@@ -72,46 +72,46 @@ typedef struct _msg_line_info {
 
 
 class nsMsgImapLineDownloadCache : public nsIImapHeaderInfo, public nsByteArray
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIIMAPHEADERINFO
   nsMsgImapLineDownloadCache();
-  virtual ~nsMsgImapLineDownloadCache();
     uint32_t  CurrentUID();
     uint32_t  SpaceAvailable();
     bool CacheEmpty();
 
     msg_line_info *GetCurrentLineInfo();
 
 private:
+  virtual ~nsMsgImapLineDownloadCache();
 
     msg_line_info *fLineInfo;
     int32_t m_msgSize;
 };
 
 #define kNumHdrsToXfer 10
 
 class nsMsgImapHdrXferInfo : public nsIImapHeaderXferInfo
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIIMAPHEADERXFERINFO
   nsMsgImapHdrXferInfo();
-  virtual ~nsMsgImapHdrXferInfo();
   void    ResetAll(); // reset HeaderInfos for re-use
   void    ReleaseAll(); // release HeaderInfos (frees up memory)
   // this will return null if we're full, in which case the client code
   // should transfer the headers and retry.
   nsIImapHeaderInfo *StartNewHdr();
   // call when we've finished adding lines to current hdr
   void    FinishCurrentHdr();
 private:
+  virtual ~nsMsgImapHdrXferInfo();
   nsCOMArray<nsIImapHeaderInfo> m_hdrInfos;
   int32_t   m_nextFreeHdrInfo;
 };
 
 // State Flags (Note, I use the word state in terms of storing
 // state information about the connection (authentication, have we sent
 // commands, etc. I do not intend it to refer to protocol state)
 // Use these flags in conjunction with SetFlag/TestFlag/ClearFlag instead
@@ -692,20 +692,20 @@ public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIIMAPMOCKCHANNEL
   NS_DECL_NSICHANNEL
   NS_DECL_NSIREQUEST
   NS_DECL_NSICACHELISTENER
   NS_DECL_NSITRANSPORTEVENTSINK
 
   nsImapMockChannel();
-  virtual ~nsImapMockChannel();
   static nsresult Create (const nsIID& iid, void **result);
 
 protected:
+  virtual ~nsImapMockChannel();
   nsCOMPtr <nsIURI> m_url;
 
   nsCOMPtr<nsIURI> m_originalUrl;
   nsCOMPtr<nsILoadGroup> m_loadGroup;
   nsCOMPtr<nsIStreamListener> m_channelListener;
   nsISupports * m_channelContext; 
   nsresult m_cancelStatus;
   nsLoadFlags mLoadFlags;
--- a/mailnews/imap/src/nsImapService.h
+++ b/mailnews/imap/src/nsImapService.h
@@ -26,27 +26,27 @@ class nsImapService : public nsIImapServ
                       public nsIMsgMessageService,
                       public nsIMsgMessageFetchPartService,
                       public nsIProtocolHandler,
                       public nsIMsgProtocolInfo,
                       public nsIContentHandler
 {
 public:
   nsImapService();
-  virtual ~nsImapService();
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIMSGPROTOCOLINFO
   NS_DECL_NSIIMAPSERVICE
   NS_DECL_NSIMSGMESSAGESERVICE
   NS_DECL_NSIPROTOCOLHANDLER
   NS_DECL_NSIMSGMESSAGEFETCHPARTSERVICE
   NS_DECL_NSICONTENTHANDLER
 
 protected:
+  virtual ~nsImapService();
   char GetHierarchyDelimiter(nsIMsgFolder *aMsgFolder);
 
   nsresult GetFolderName(nsIMsgFolder *aImapFolder, nsACString &aFolderName);
 
   // This is called by both FetchMessage and StreamMessage
   nsresult GetMessageFromUrl(nsIImapUrl *aImapUrl,
                              nsImapAction aImapAction,
                              nsIMsgFolder *aImapMailFolder, 
--- a/mailnews/imap/src/nsImapUtils.h
+++ b/mailnews/imap/src/nsImapUtils.h
@@ -38,17 +38,16 @@ nsCreateImapBaseMessageURI(const nsACStr
 void AllocateImapUidString(uint32_t *msgUids, uint32_t &msgCount, nsImapFlagAndUidState *flagState, nsCString &returnString);
 void ParseUidString(const char *uidString, nsTArray<nsMsgKey> &keys);
 void AppendUid(nsCString &msgIds, uint32_t uid);
 
 class nsImapMailboxSpec : public nsIMailboxSpec
 {
 public:
   nsImapMailboxSpec();
-  virtual ~nsImapMailboxSpec();
   
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIMAILBOXSPEC
     
   nsImapMailboxSpec& operator= (const nsImapMailboxSpec& aCopy);
   
   nsCOMPtr<nsIImapFlagAndUidState> mFlagState;
   nsIMAPNamespace                  *mNamespaceForFolder;  
@@ -65,11 +64,14 @@ public:
   nsCString mHostName;
   nsString  mUnicharPathName;
   char      mHierarchySeparator;
   bool      mFolderSelected;
   bool      mDiscoveredFromLsub;
   bool      mOnlineVerified;
   
   nsImapProtocol *mConnection;	// do we need this? It seems evil
+
+private:
+  virtual ~nsImapMailboxSpec();
 };
 
 #endif //NS_IMAPUTILS_H
--- a/mailnews/imap/src/nsSyncRunnableHelpers.h
+++ b/mailnews/imap/src/nsSyncRunnableHelpers.h
@@ -13,82 +13,87 @@
 #include "nsIImapServerSink.h"
 #include "nsIImapProtocolSink.h"
 #include "nsIImapMessageSink.h"
 
 // The classes in this file proxy method calls to the main thread
 // synchronously. The main thread must not block on this thread, or a
 // deadlock condition can occur.
 
-class StreamListenerProxy : public nsIStreamListener
+class StreamListenerProxy MOZ_FINAL : public nsIStreamListener
 {
 public:
   StreamListenerProxy(nsIStreamListener* receiver)
     : mReceiver(receiver)
   { }
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
 
 private:
+  ~StreamListenerProxy() {}
   nsCOMPtr<nsIStreamListener> mReceiver;
 };
 
-class ImapMailFolderSinkProxy : public nsIImapMailFolderSink
+class ImapMailFolderSinkProxy MOZ_FINAL : public nsIImapMailFolderSink
 {
 public:
   ImapMailFolderSinkProxy(nsIImapMailFolderSink* receiver)
     : mReceiver(receiver)
   {
     NS_ASSERTION(receiver, "Don't allow receiver is nullptr");
   }
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIIMAPMAILFOLDERSINK
 
 private:
+  ~ImapMailFolderSinkProxy() {}
   nsCOMPtr<nsIImapMailFolderSink> mReceiver;
 };
 
-class ImapServerSinkProxy : public nsIImapServerSink
+class ImapServerSinkProxy MOZ_FINAL : public nsIImapServerSink
 {
 public:
   ImapServerSinkProxy(nsIImapServerSink* receiver)
     : mReceiver(receiver)
   { }
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIIMAPSERVERSINK
 
 private:
+  ~ImapServerSinkProxy() {}
   nsCOMPtr<nsIImapServerSink> mReceiver;
 };
 
 
-class ImapMessageSinkProxy: public nsIImapMessageSink
+class ImapMessageSinkProxy MOZ_FINAL : public nsIImapMessageSink
 {
 public:
   ImapMessageSinkProxy(nsIImapMessageSink* receiver)
     : mReceiver(receiver)
   { }
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIIMAPMESSAGESINK
 
 private:
+  ~ImapMessageSinkProxy() {}
   nsCOMPtr<nsIImapMessageSink> mReceiver;
 };
 
-class ImapProtocolSinkProxy : public nsIImapProtocolSink
+class ImapProtocolSinkProxy MOZ_FINAL : public nsIImapProtocolSink
 {
 public:
   ImapProtocolSinkProxy(nsIImapProtocolSink* receiver)
     : mReceiver(receiver)
   { }
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIIMAPPROTOCOLSINK
 
 private:
+  ~ImapProtocolSinkProxy() {}
   nsCOMPtr<nsIImapProtocolSink> mReceiver;
 };
 #endif // nsSyncRunnableHelpers_h
--- a/mailnews/import/applemail/src/nsAppleMailImport.h
+++ b/mailnews/import/applemail/src/nsAppleMailImport.h
@@ -33,39 +33,39 @@ extern PRLogModuleInfo *APPLEMAILLOGMODU
 class nsIImportService;
 class nsIMutableArray;
 
 class nsAppleMailImportModule : public nsIImportModule
 {
   public:
 
   nsAppleMailImportModule();
-  virtual ~nsAppleMailImportModule();
     
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIIMPORTMODULE
 
   private:
+  virtual ~nsAppleMailImportModule();
     
   nsCOMPtr<nsIStringBundle> mBundle;
 };
 
 class nsAppleMailImportMail : public nsIImportMail
 {
   public:
 
   nsAppleMailImportMail();
-  virtual ~nsAppleMailImportMail();
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIIMPORTMAIL
 
   nsresult Initialize();
 
   private:
+  virtual ~nsAppleMailImportMail();
 
   void FindAccountMailDirs(nsIFile *aRoot, nsIMutableArray *aMailboxDescs, nsIImportService *aImportService);
   nsresult FindMboxDirs(nsIFile *aFolder, nsIMutableArray *aMailboxDescs, nsIImportService *aImportService);
   nsresult AddMboxDir(nsIFile *aFolder, nsIMutableArray *aMailboxDescs, nsIImportService *aImportService);
     
   // aInfoString is the format to a "foo %s" string. It may be NULL if the error string needs no such format.
   void ReportStatus(const char16_t* aErrorName, nsString &aName, nsAString &aStream);
   static void SetLogs(const nsAString& success, const nsAString& error, char16_t **aOutErrorLog, char16_t **aSuccessLog);
--- a/mailnews/import/eudora/src/nsEudoraCompose.cpp
+++ b/mailnews/import/eudora/src/nsEudoraCompose.cpp
@@ -93,18 +93,16 @@ nsIMsgIdentity * nsEudoraCompose::s_pIde
 // First off, a listener
 class EudoraSendListener : public nsIMsgSendListener
 {
 public:
   EudoraSendListener() {
     m_done = false;
   }
 
-  virtual ~EudoraSendListener() {}
-
   // nsISupports interface
   NS_DECL_THREADSAFE_ISUPPORTS
 
   /* void OnStartSending (in string aMsgID, in uint32_t aMsgSize); */
   NS_IMETHOD OnStartSending(const char *aMsgID, uint32_t aMsgSize) {return NS_OK;}
 
   /* void OnProgress (in string aMsgID, in uint32_t aProgress, in uint32_t aProgressMax); */
   NS_IMETHOD OnProgress(const char *aMsgID, uint32_t aProgress, uint32_t aProgressMax) {return NS_OK;}
@@ -128,16 +126,19 @@ public:
 
   static nsresult CreateSendListener(nsIMsgSendListener **ppListener);
 
   void Reset() { m_done = false;  m_location = nullptr;}
 
 public:
   bool m_done;
   nsCOMPtr <nsIFile> m_location;
+
+private:
+  virtual ~EudoraSendListener() {}
 };
 
 
 NS_IMPL_ISUPPORTS(EudoraSendListener, nsIMsgSendListener)
 
 nsresult EudoraSendListener::CreateSendListener(nsIMsgSendListener **ppListener)
 {
   NS_ENSURE_ARG_POINTER(ppListener);
--- a/mailnews/import/eudora/src/nsEudoraFilters.h
+++ b/mailnews/import/eudora/src/nsEudoraFilters.h
@@ -12,27 +12,27 @@
 #include "nsCOMPtr.h"
 #include "nsMsgFilterCore.h"
 
 class nsIMsgFolder;
 
 class nsEudoraFilters : public nsIImportFilters {
 public:
   nsEudoraFilters();
-  virtual ~nsEudoraFilters();
 
   static nsresult Create(nsIImportFilters** aImport);
 
   // nsISupports interface
   NS_DECL_ISUPPORTS
 
   // nsIImportFilters interface
   NS_DECL_NSIIMPORTFILTERS
 
 private:
+  virtual ~nsEudoraFilters();
   nsCOMPtr<nsIFile> m_pLocation;
   nsCOMPtr<nsIMutableArray> m_pServerArray;
   nsCOMPtr<nsIMutableArray> m_pFilterArray;
   nsCOMPtr<nsIMsgFolder> m_pMailboxesRoot;
 
   nsString m_errorLog;
 
   bool m_isAnd;
--- a/mailnews/import/eudora/src/nsEudoraImport.cpp
+++ b/mailnews/import/eudora/src/nsEudoraImport.cpp
@@ -59,17 +59,16 @@
 
 static NS_DEFINE_IID(kISupportsIID,      NS_ISUPPORTS_IID);
 PRLogModuleInfo *EUDORALOGMODULE = nullptr;
 
 class ImportEudoraMailImpl : public nsIImportMail
 {
 public:
   ImportEudoraMailImpl();
-  virtual ~ImportEudoraMailImpl();
 
   static nsresult Create(nsIImportMail** aImport);
 
   // nsISupports interface
   NS_DECL_THREADSAFE_ISUPPORTS
 
   // nsIImportmail interface
 
@@ -91,16 +90,17 @@ public:
 
 public:
   static void  AddLinebreak(nsString *pStream);
   static void  SetLogs(nsString& success, nsString& error, char16_t **pError, char16_t **pSuccess);
   static void ReportError(int32_t errorNum, nsString& name, nsString *pStream);
 
 
 private:
+  virtual ~ImportEudoraMailImpl();
   static void  ReportSuccess(nsString& name, int32_t count, nsString *pStream);
 
 private:
 #if defined(XP_WIN)
   nsEudoraWin32  m_eudora;
 #endif
 #ifdef XP_MACOSX
   nsEudoraMac    m_eudora;
@@ -108,17 +108,16 @@ private:
   uint32_t    m_bytes;
 };
 
 
 class ImportEudoraAddressImpl : public nsIImportAddressBooks
 {
 public:
   ImportEudoraAddressImpl();
-  virtual ~ImportEudoraAddressImpl();
 
   static nsresult Create(nsIImportAddressBooks** aImport);
 
   // nsISupports interface
   NS_DECL_THREADSAFE_ISUPPORTS
 
   // nsIImportAddressBooks interface
 
@@ -146,16 +145,17 @@ public:
   NS_IMETHOD GetImportProgress(uint32_t *_retval);
 
   NS_IMETHOD GetSampleData(int32_t index, bool *pFound, char16_t **pStr)
     { return NS_ERROR_FAILURE;}
 
   NS_IMETHOD SetSampleLocation(nsIFile *) { return NS_OK; }
 
 private:
+  virtual ~ImportEudoraAddressImpl();
   static void  ReportSuccess(nsString& name, nsString *pStream);
 
 private:
 #if defined(XP_WIN)
   nsEudoraWin32  m_eudora;
 #endif
 #ifdef XP_MACOSX
   nsEudoraMac    m_eudora;
--- a/mailnews/import/eudora/src/nsEudoraImport.h
+++ b/mailnews/import/eudora/src/nsEudoraImport.h
@@ -21,24 +21,24 @@
 
 #define kEudoraSupportsString NS_IMPORT_MAIL_STR "," NS_IMPORT_ADDRESS_STR "," NS_IMPORT_SETTINGS_STR "," NS_IMPORT_FILTERS_STR
 
 class nsEudoraImport : public nsIImportModule
 {
 public:
 
   nsEudoraImport();
-  virtual ~nsEudoraImport();
 
   NS_DECL_ISUPPORTS
 
   ////////////////////////////////////////////////////////////////////////////////////////
   // we suppport the nsIImportModule interface
   ////////////////////////////////////////////////////////////////////////////////////////
 
   NS_DECL_NSIIMPORTMODULE
 
 
 protected:
+  virtual ~nsEudoraImport();
 };
 
 
 #endif /* nsEudoraImport_h___ */
--- a/mailnews/import/eudora/src/nsEudoraSettings.h
+++ b/mailnews/import/eudora/src/nsEudoraSettings.h
@@ -9,23 +9,23 @@
 
 #include "nsIImportSettings.h"
 #include "nsIFile.h"
 #include "nsCOMPtr.h"
 
 class nsEudoraSettings : public nsIImportSettings {
 public:
     nsEudoraSettings();
-    virtual ~nsEudoraSettings();
 
   static nsresult Create(nsIImportSettings** aImport);
 
     // nsISupports interface
     NS_DECL_ISUPPORTS
 
   // nsIImportSettings interface
   NS_DECL_NSIIMPORTSETTINGS
 
 private:
+  virtual ~nsEudoraSettings();
   nsCOMPtr<nsIFile> m_pLocation;
 };
 
 #endif /* nsEudoraSettings_h___ */
--- a/mailnews/import/oexpress/nsOEImport.cpp
+++ b/mailnews/import/oexpress/nsOEImport.cpp
@@ -50,17 +50,16 @@
 
 static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
 PRLogModuleInfo *OELOGMODULE = nullptr;
 
 class ImportOEMailImpl : public nsIImportMail
 {
 public:
   ImportOEMailImpl();
-  virtual ~ImportOEMailImpl();
 
   static nsresult Create(nsIImportMail** aImport);
 
   // nsISupports interface
   NS_DECL_THREADSAFE_ISUPPORTS
 
   // nsIImportmail interface
 
@@ -82,25 +81,25 @@ public:
 
 public:
   static void ReportSuccess(nsString& name, int32_t count, nsString *pStream);
   static void ReportError(int32_t errorNum, nsString& name, nsString *pStream);
   static void AddLinebreak(nsString *pStream);
   static void SetLogs(nsString& success, nsString& error, char16_t **pError, char16_t **pSuccess);
 
 private:
+  virtual ~ImportOEMailImpl();
   uint32_t m_bytesDone;
 };
 
 
 class ImportOEAddressImpl : public nsIImportAddressBooks
 {
 public:
     ImportOEAddressImpl();
-    virtual ~ImportOEAddressImpl();
 
   static nsresult Create(nsIImportAddressBooks** aImport);
 
   // nsISupports interface
   NS_DECL_THREADSAFE_ISUPPORTS
 
     // nsIImportAddressBooks interface
 
@@ -128,16 +127,17 @@ public:
   NS_IMETHOD GetImportProgress(uint32_t *_retval);
 
   NS_IMETHOD GetSampleData(int32_t index, bool *pFound, char16_t **pStr)
     { return NS_ERROR_FAILURE;}
 
   NS_IMETHOD SetSampleLocation(nsIFile *) { return NS_OK; }
 
 private:
+  virtual ~ImportOEAddressImpl();
   static void ReportSuccess(nsString& name, nsString *pStream);
 
 private:
   CWAB * m_pWab;
   int m_doneSoFar;
 };
 ////////////////////////////////////////////////////////////////////////
 
--- a/mailnews/import/oexpress/nsOEImport.h
+++ b/mailnews/import/oexpress/nsOEImport.h
@@ -18,25 +18,25 @@
 
 #define kOESupportsString NS_IMPORT_MAIL_STR "," NS_IMPORT_ADDRESS_STR "," NS_IMPORT_SETTINGS_STR
 
 class nsOEImport : public nsIImportModule
 {
 public:
 
   nsOEImport();
-  virtual ~nsOEImport();
 
   NS_DECL_ISUPPORTS
 
   ////////////////////////////////////////////////////////////////////////////////////////
   // we suppport the nsIImportModule interface
   ////////////////////////////////////////////////////////////////////////////////////////
 
 
   NS_DECL_NSIIMPORTMODULE
 
 protected:
+  virtual ~nsOEImport();
 };
 
 
 
 #endif /* nsOEImport_h___ */
--- a/mailnews/import/oexpress/nsOESettings.h
+++ b/mailnews/import/oexpress/nsOESettings.h
@@ -6,17 +6,17 @@
 #ifndef nsOESettings_h___
 #define nsOESettings_h___
 
 #include "nsIImportSettings.h"
 
 class nsOESettings : public nsIImportSettings {
 public:
   nsOESettings();
-  virtual ~nsOESettings();
   static nsresult Create(nsIImportSettings** aImport);
   NS_DECL_ISUPPORTS
   NS_DECL_NSIIMPORTSETTINGS
 
 private:
+  virtual ~nsOESettings();
 };
 
 #endif /* nsOESettings_h___ */
--- a/mailnews/import/outlook/src/nsOutlookCompose.cpp
+++ b/mailnews/import/outlook/src/nsOutlookCompose.cpp
@@ -115,18 +115,16 @@ private:
 class OutlookSendListener : public nsIMsgSendListener
 {
 public:
   OutlookSendListener() {
     m_done = false;
     m_location = nullptr;
   }
 
-  virtual ~OutlookSendListener() { NS_IF_RELEASE(m_location); }
-
   // nsISupports interface
   NS_DECL_THREADSAFE_ISUPPORTS
 
   /* void OnStartSending (in string aMsgID, in uint32_t aMsgSize); */
   NS_IMETHOD OnStartSending(const char *aMsgID, uint32_t aMsgSize) {return NS_OK;}
 
   /* void OnProgress (in string aMsgID, in uint32_t aProgress, in uint32_t aProgressMax); */
   NS_IMETHOD OnProgress(const char *aMsgID, uint32_t aProgress, uint32_t aProgressMax) {return NS_OK;}
@@ -147,16 +145,18 @@ public:
 
   /* void OnGetDraftFolderURI (); */
   NS_IMETHOD OnGetDraftFolderURI(const char *aFolderURI) {return NS_OK;}
 
   static nsresult CreateSendListener(nsIMsgSendListener **ppListener);
   void Reset() { m_done = false; NS_IF_RELEASE(m_location);}
 
 public:
+  virtual ~OutlookSendListener() { NS_IF_RELEASE(m_location); }
+
   bool m_done;
   nsIFile * m_location;
 };
 
 NS_IMPL_ISUPPORTS(OutlookSendListener, nsIMsgSendListener)
 
 nsresult OutlookSendListener::CreateSendListener(nsIMsgSendListener **ppListener)
 {
--- a/mailnews/import/outlook/src/nsOutlookImport.cpp
+++ b/mailnews/import/outlook/src/nsOutlookImport.cpp
@@ -43,17 +43,16 @@
 
 static NS_DEFINE_IID(kISupportsIID,      NS_ISUPPORTS_IID);
 PRLogModuleInfo *OUTLOOKLOGMODULE = nullptr;
 
 class ImportOutlookMailImpl : public nsIImportMail
 {
 public:
   ImportOutlookMailImpl();
-  virtual ~ImportOutlookMailImpl();
 
   static nsresult Create(nsIImportMail** aImport);
 
   // nsISupports interface
   NS_DECL_THREADSAFE_ISUPPORTS
 
   // nsIImportmail interface
 
@@ -75,26 +74,26 @@ public:
 
 public:
   static void  ReportSuccess(nsString& name, int32_t count, nsString *pStream);
   static void ReportError(int32_t errorNum, nsString& name, nsString *pStream);
   static void  AddLinebreak(nsString *pStream);
   static void  SetLogs(nsString& success, nsString& error, char16_t **pError, char16_t **pSuccess);
 
 private:
+  virtual ~ImportOutlookMailImpl();
   nsOutlookMail  m_mail;
   uint32_t    m_bytesDone;
 };
 
 
 class ImportOutlookAddressImpl : public nsIImportAddressBooks
 {
 public:
   ImportOutlookAddressImpl();
-  virtual ~ImportOutlookAddressImpl();
 
   static nsresult Create(nsIImportAddressBooks** aImport);
 
   // nsISupports interface
   NS_DECL_THREADSAFE_ISUPPORTS
 
   // nsIImportAddressBooks interface
 
@@ -123,16 +122,17 @@ public:
   NS_IMETHOD GetImportProgress(uint32_t *_retval);
 
   NS_IMETHOD GetSampleData(int32_t index, bool *pFound, char16_t **pStr)
     { return NS_ERROR_FAILURE;}
 
   NS_IMETHOD SetSampleLocation(nsIFile *) { return NS_OK; }
 
 private:
+  virtual ~ImportOutlookAddressImpl();
   void  ReportSuccess(nsString& name, nsString *pStream);
 
 private:
   uint32_t    m_msgCount;
   uint32_t    m_msgTotal;
   nsOutlookMail  m_address;
 };
 ////////////////////////////////////////////////////////////////////////
--- a/mailnews/import/outlook/src/nsOutlookImport.h
+++ b/mailnews/import/outlook/src/nsOutlookImport.h
@@ -20,25 +20,25 @@
 
 #define kOutlookSupportsString NS_IMPORT_MAIL_STR "," NS_IMPORT_ADDRESS_STR "," NS_IMPORT_SETTINGS_STR
 
 class nsOutlookImport : public nsIImportModule
 {
 public:
 
   nsOutlookImport();
-  virtual ~nsOutlookImport();
 
   NS_DECL_ISUPPORTS
 
   ////////////////////////////////////////////////////////////////////////////////////////
   // we suppport the nsIImportModule interface
   ////////////////////////////////////////////////////////////////////////////////////////
 
   NS_DECL_NSIIMPORTMODULE
 
 protected:
+  virtual ~nsOutlookImport();
 };
 
 
 
 
 #endif /* nsOutlookImport_h___ */
--- a/mailnews/import/outlook/src/nsOutlookSettings.h
+++ b/mailnews/import/outlook/src/nsOutlookSettings.h
@@ -7,23 +7,23 @@
 #define nsOutlookSettings_h___
 
 #include "nsIImportSettings.h"
 
 
 class nsOutlookSettings : public nsIImportSettings {
 public:
     nsOutlookSettings();
-    virtual ~nsOutlookSettings();
 
   static nsresult Create(nsIImportSettings** aImport);
 
     // nsISupports interface
     NS_DECL_ISUPPORTS
 
   // nsIImportSettings interface
   NS_DECL_NSIIMPORTSETTINGS
 
 private:
+  virtual ~nsOutlookSettings();
 
 };
 
 #endif /* nsOutlookSettings_h___ */
--- a/mailnews/import/src/nsImportABDescriptor.h
+++ b/mailnews/import/src/nsImportABDescriptor.h
@@ -81,21 +81,21 @@ public:
     return NS_OK;
   }
   NS_IMETHOD SetImport(bool doImport) MOZ_OVERRIDE {
     mImport = doImport;
     return NS_OK;
   }
 
   nsImportABDescriptor();
-  virtual ~nsImportABDescriptor() {}
 
   static NS_METHOD Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
 
 private:
+  virtual ~nsImportABDescriptor() {}
   uint32_t mId; // used by creator of the structure
   uint32_t mRef; // depth in the hierarchy
   nsString mDisplayName; // name of this mailbox
   nsCOMPtr<nsIFile> mFile; // source file (if applicable)
   uint32_t mSize; // size
   bool mImport; // import it or not?
 };
 
--- a/mailnews/import/src/nsImportAddressBooks.cpp
+++ b/mailnews/import/src/nsImportAddressBooks.cpp
@@ -35,17 +35,16 @@ static void ImportAddressThread(void *st
 
 class AddressThreadData;
 
 class nsImportGenericAddressBooks : public nsIImportGeneric
 {
 public:
 
   nsImportGenericAddressBooks();
-  virtual ~nsImportGenericAddressBooks();
 
   NS_DECL_THREADSAFE_ISUPPORTS
 
   /* nsISupports GetData (in string dataId); */
   NS_IMETHOD GetData(const char *dataId, nsISupports **_retval);
 
   NS_IMETHOD SetData(const char *dataId, nsISupports *pData);
 
@@ -57,16 +56,17 @@ public:
 
   NS_IMETHOD ContinueImport(bool *_retval);
 
   NS_IMETHOD GetProgress(int32_t *_retval);
 
   NS_IMETHOD CancelImport(void);
 
 private:
+  virtual ~nsImportGenericAddressBooks();
   void  GetDefaultLocation(void);
   void  GetDefaultBooks(void);
   void  GetDefaultFieldMap(void);
 
 public:
   static void  SetLogs(nsString& success, nsString& error, nsISupportsString *pSuccess, nsISupportsString *pError);
   static void ReportError(const char16_t *pName, nsString *pStream,
                           nsIStringBundle *aBundle);
--- a/mailnews/import/src/nsImportEmbeddedImageData.h
+++ b/mailnews/import/src/nsImportEmbeddedImageData.h
@@ -6,25 +6,27 @@
 #ifndef __IMPORTEMBEDDEDIMAGETDATA_H__
 #define __IMPORTEMBEDDEDIMAGETDATA_H__
 
 #include "nsIMsgSend.h"
 #include "nsStringGlue.h"
 #include "nsCOMPtr.h"
 #include "nsIURI.h"
 
-class nsImportEmbeddedImageData : public nsIMsgEmbeddedImageData
+class nsImportEmbeddedImageData MOZ_FINAL : public nsIMsgEmbeddedImageData
 {
 public:
   nsImportEmbeddedImageData(nsIURI *aUri, const nsACString &aCID);
   nsImportEmbeddedImageData(nsIURI *aUri, const nsACString &aCID, const nsACString &aName);
   nsImportEmbeddedImageData();
-  ~nsImportEmbeddedImageData();
   NS_DECL_NSIMSGEMBEDDEDIMAGEDATA
   NS_DECL_ISUPPORTS
 
   nsCOMPtr<nsIURI> m_uri;
   nsCString m_cid;
   nsCString m_name;
+
+private:
+  ~nsImportEmbeddedImageData();
 };
 
 
 #endif
--- a/mailnews/import/src/nsImportFieldMap.h
+++ b/mailnews/import/src/nsImportFieldMap.h
@@ -19,21 +19,21 @@ class nsIStringBundle;
 class nsImportFieldMap : public nsIImportFieldMap
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
   NS_DECL_NSIIMPORTFIELDMAP
 
   nsImportFieldMap(nsIStringBundle *aBundle);
-  virtual ~nsImportFieldMap();
 
    static NS_METHOD Create(nsIStringBundle *aBundle, nsISupports *aOuter, REFNSIID aIID, void **aResult);
 
 private:
+  virtual ~nsImportFieldMap();
   nsresult  Allocate(int32_t newSize);
 
 private:
   int32_t    m_numFields;
   int32_t  *  m_pFields;
   bool *  m_pActive;
   int32_t    m_allocated;
   nsVoidArray  m_descriptions;
--- a/mailnews/import/src/nsImportMail.cpp
+++ b/mailnews/import/src/nsImportMail.cpp
@@ -51,17 +51,16 @@ static void ImportMailThread(void *stuff
 
 class ImportThreadData;
 
 class nsImportGenericMail : public nsIImportGeneric
 {
 public:
 
   nsImportGenericMail();
-  virtual ~nsImportGenericMail();
 
   NS_DECL_THREADSAFE_ISUPPORTS
 
   /* nsISupports GetData (in string dataId); */
   NS_IMETHOD GetData(const char *dataId, nsISupports **_retval);
 
   NS_IMETHOD SetData(const char *dataId, nsISupports *pData);
 
@@ -73,16 +72,17 @@ public:
 
   NS_IMETHOD ContinueImport(bool *_retval);
 
   NS_IMETHOD GetProgress(int32_t *_retval);
 
   NS_IMETHOD CancelImport(void);
 
 private:
+  virtual ~nsImportGenericMail();
   bool    CreateFolder(nsIMsgFolder **ppFolder);
   void  GetDefaultMailboxes(void);
   void  GetDefaultLocation(void);
   void  GetDefaultDestination(void);
   void  GetMailboxName(uint32_t index, nsISupportsString *pStr);
 
 public:
   static void  SetLogs(nsString& success, nsString& error, nsISupportsString *pSuccess, nsISupportsString *pError);
--- a/mailnews/import/src/nsImportMailboxDescriptor.h
+++ b/mailnews/import/src/nsImportMailboxDescriptor.h
@@ -41,21 +41,21 @@ public:
   NS_IMETHOD  SetImport(bool doImport) MOZ_OVERRIDE { m_import = doImport; return NS_OK;}
 
   /* readonly attribute nsIFile file; */
   NS_IMETHOD GetFile(nsIFile * *aFile) MOZ_OVERRIDE { if (m_pFile) { NS_ADDREF(*aFile = m_pFile); return NS_OK;} else return NS_ERROR_FAILURE; }
 
 
 
   nsImportMailboxDescriptor();
-  virtual ~nsImportMailboxDescriptor() {}
 
    static NS_METHOD Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
 
 private:
+  virtual ~nsImportMailboxDescriptor() {}
   uint32_t    m_id;      // used by creator of the structure
   uint32_t    m_depth;    // depth in the hierarchy
   nsString    m_displayName;// name of this mailbox
   nsCOMPtr <nsIFile> m_pFile;  // source file (if applicable)
   uint32_t    m_size;
   bool        m_import;    // import it or not?
 };
 
--- a/mailnews/import/src/nsImportMimeEncode.h
+++ b/mailnews/import/src/nsImportMimeEncode.h
@@ -56,18 +56,18 @@ protected:
 
 class nsIImportMimeEncodeImpl : public nsIImportMimeEncode {
 public:
 	NS_DECL_ISUPPORTS
 
 	NS_DECL_NSIIMPORTMIMEENCODE
 
 	nsIImportMimeEncodeImpl();
-	virtual ~nsIImportMimeEncodeImpl();
 
 private:
+	virtual ~nsIImportMimeEncodeImpl();
 	ImportOutFile *			m_pOut;
 	nsImportMimeEncode *	m_pEncode;
 };
 
 
 #endif /* nsImportMimeEncode_h__ */
 
--- a/mailnews/import/src/nsImportService.h
+++ b/mailnews/import/src/nsImportService.h
@@ -19,23 +19,23 @@
 
 class nsImportModuleList;
 
 class nsImportService : public nsIImportService
 {
 public:
 
   nsImportService();
-  virtual ~nsImportService();
 
   NS_DECL_THREADSAFE_ISUPPORTS
 
     NS_DECL_NSIIMPORTSERVICE
 
 private:
+  virtual ~nsImportService();
     nsresult LoadModuleInfo(const char*pClsId, const char *pSupports);
   nsresult DoDiscover(void);
 
 private:
     nsImportModuleList * m_pModules;
   bool m_didDiscovery;
   nsCString m_sysCharset;
   nsIUnicodeDecoder * m_pDecoder;
--- a/mailnews/import/text/src/nsTextImport.cpp
+++ b/mailnews/import/text/src/nsTextImport.cpp
@@ -48,17 +48,17 @@
 #define TEXTIMPORT_ADDRESS_SUCCESS       2003
 #define TEXTIMPORT_ADDRESS_BADPARAM      2004
 #define TEXTIMPORT_ADDRESS_BADSOURCEFILE 2005
 #define TEXTIMPORT_ADDRESS_CONVERTERROR  2006
 
 static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
 PRLogModuleInfo* TEXTIMPORTLOGMODULE;
 
-class ImportAddressImpl : public nsIImportAddressBooks
+class ImportAddressImpl MOZ_FINAL : public nsIImportAddressBooks
 {
 public:
   ImportAddressImpl(nsIStringBundle* aStringBundle);
 
   static nsresult Create(nsIImportAddressBooks** aImport,
                          nsIStringBundle *aStringBundle);
 
     // nsISupports interface
@@ -100,16 +100,17 @@ private:
                             nsIStringBundle* pBundle);
   static void SetLogs(nsString& success, nsString& error, char16_t **pError,
                       char16_t **pSuccess);
   static void ReportError(int32_t errorNum, nsString& name, nsString *pStream,
                           nsIStringBundle* pBundle);
   static void SanitizeSampleData(nsString& val);
 
 private:
+  ~ImportAddressImpl() {}
   nsTextAddress m_text;
   bool m_haveDelim;
   nsCOMPtr<nsIFile> m_fileLoc;
   nsCOMPtr<nsIStringBundle> m_notProxyBundle;
   char16_t m_delim;
   uint32_t m_bytesImported;
 };
 
--- a/mailnews/import/text/src/nsTextImport.h
+++ b/mailnews/import/text/src/nsTextImport.h
@@ -17,23 +17,23 @@
   {0xa9, 0xc2, 0x0, 0xa0, 0xcc, 0x26, 0xda, 0x63 }}
 
 #define kTextSupportsString NS_IMPORT_ADDRESS_STR
 
 class nsTextImport : public nsIImportModule
 {
 public:
   nsTextImport();
-  virtual ~nsTextImport();
 
   NS_DECL_ISUPPORTS
 
   ////////////////////////////////////////////////////////////////////////////////////////
   // we suppport the nsIImportModule interface
   ////////////////////////////////////////////////////////////////////////////////////////
 
   NS_DECL_NSIIMPORTMODULE
 
 protected:
+  virtual ~nsTextImport();
   nsCOMPtr<nsIStringBundle>   m_stringBundle;
 };
 
 #endif /* nsTextImport_h___ */
--- a/mailnews/import/vcard/src/nsVCardImport.cpp
+++ b/mailnews/import/vcard/src/nsVCardImport.cpp
@@ -31,17 +31,16 @@
 
 PRLogModuleInfo *VCARDLOGMODULE = nullptr;
 static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
 
 class ImportVCardAddressImpl : public nsIImportAddressBooks
 {
 public:
   ImportVCardAddressImpl(nsIStringBundle* aStringBundle); 
-  virtual ~ImportVCardAddressImpl();
 
   static nsresult Create(
       nsIImportAddressBooks** aImport, nsIStringBundle* aStringBundle);
 
   // nsISupports interface
   NS_DECL_THREADSAFE_ISUPPORTS
 
   // nsIImportAddressBooks interface
@@ -76,16 +75,17 @@ public:
 
   NS_IMETHOD GetSampleData(int32_t index, bool *pFound, char16_t **pStr)
   { return NS_ERROR_FAILURE;}
 
   NS_IMETHOD SetSampleLocation(nsIFile *)
   { return NS_ERROR_FAILURE; } 
 
 private:
+  virtual ~ImportVCardAddressImpl();
   static void ReportSuccess(
       nsString& name, nsString *pStream, nsIStringBundle* pBundle);
   static void SetLogs(
       nsString& success, nsString& error,
       char16_t **pError, char16_t **pSuccess);
   static void ReportError(
       const char *errorName, nsString& name, nsString *pStream,
       nsIStringBundle* pBundle);
--- a/mailnews/import/vcard/src/nsVCardImport.h
+++ b/mailnews/import/vcard/src/nsVCardImport.h
@@ -16,23 +16,23 @@
 
 #define VCARDIMPORT_MSGS_URL "chrome://messenger/locale/vCardImportMsgs.properties"
 
 class nsVCardImport : public nsIImportModule
 {
 public:
 
   nsVCardImport();
-  virtual ~nsVCardImport();
 
   NS_DECL_ISUPPORTS
 
   ////////////////////////////////////////////////////////////////////////////////////////
   // we suppport the nsIImportModule interface
   ////////////////////////////////////////////////////////////////////////////////////////
 
   NS_DECL_NSIIMPORTMODULE
 
 protected:
+  virtual ~nsVCardImport();
   nsCOMPtr<nsIStringBundle> m_stringBundle;
 };
 
 #endif /* nsVCardImport_h___ */
--- a/mailnews/import/winlivemail/nsWMImport.cpp
+++ b/mailnews/import/winlivemail/nsWMImport.cpp
@@ -42,17 +42,16 @@
 
 static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
 PRLogModuleInfo *WMLOGMODULE = nullptr;
 
 class ImportWMMailImpl : public nsIImportMail
 {
 public:
   ImportWMMailImpl();
-  virtual ~ImportWMMailImpl();
 
   static nsresult Create(nsIImportMail** aImport);
 
   // nsISupports interface
   NS_DECL_THREADSAFE_ISUPPORTS
 
   // nsIImportmail interface
 
@@ -74,16 +73,17 @@ public:
 
 public:
   static void ReportSuccess(nsString& name, int32_t count, nsString *pStream);
   static void ReportError(int32_t errorNum, nsString& name, nsString *pStream);
   static void AddLinebreak(nsString *pStream);
   static void SetLogs(nsString& success, nsString& error, char16_t **pError, char16_t **pSuccess);
 
 private:
+  virtual ~ImportWMMailImpl();
   uint32_t m_bytesDone;
 };
 
 nsWMImport::nsWMImport()
 {
   // Init logging module.
   if (!WMLOGMODULE)
     WMLOGMODULE = PR_NewLogModule("IMPORT");
--- a/mailnews/import/winlivemail/nsWMImport.h
+++ b/mailnews/import/winlivemail/nsWMImport.h
@@ -17,22 +17,22 @@
 // currently only support setting import
 #define kWMSupportsString NS_IMPORT_SETTINGS_STR
 
 class nsWMImport : public nsIImportModule
 {
 public:
 
   nsWMImport();
-  virtual ~nsWMImport();
 
   NS_DECL_ISUPPORTS
 
   ////////////////////////////////////////////////////////////////////////////////////////
   // we suppport the nsIImportModule interface
   ////////////////////////////////////////////////////////////////////////////////////////
 
   NS_DECL_NSIIMPORTMODULE
 
 protected:
+  virtual ~nsWMImport();
 };
 
 #endif /* nsWMImport_h___ */
--- a/mailnews/import/winlivemail/nsWMSettings.h
+++ b/mailnews/import/winlivemail/nsWMSettings.h
@@ -6,17 +6,17 @@
 #ifndef nsWMSettings_h___
 #define nsWMSettings_h___
 
 #include "nsIImportSettings.h"
 
 class nsWMSettings : public nsIImportSettings {
 public:
   nsWMSettings();
-  virtual ~nsWMSettings();
   static nsresult Create(nsIImportSettings** aImport);
   NS_DECL_ISUPPORTS
   NS_DECL_NSIIMPORTSETTINGS
 
 private:
+  virtual ~nsWMSettings();
 };
 
 #endif /* nsWMSettings_h___ */
--- a/mailnews/intl/nsCharsetConverterManager.h
+++ b/mailnews/intl/nsCharsetConverterManager.h
@@ -17,20 +17,20 @@ class nsCharsetConverterManager : public
 {
   friend class nsCharsetAlias;
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSICHARSETCONVERTERMANAGER
 
 public:
   nsCharsetConverterManager();
-  virtual ~nsCharsetConverterManager();
 
   static void Shutdown();
 
 private:
+  virtual ~nsCharsetConverterManager();
 
   static bool IsInternal(const nsACString& aCharset);
 };
 
 #endif // nsCharsetConverterManager_h__
 
 
--- a/mailnews/local/src/nsLocalUndoTxn.h
+++ b/mailnews/local/src/nsLocalUndoTxn.h
@@ -71,16 +71,16 @@ private:
 
 class nsLocalUndoFolderListener : public nsIFolderListener
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIFOLDERLISTENER
 
   nsLocalUndoFolderListener(nsLocalMoveCopyMsgTxn *aTxn, nsIMsgFolder *aFolder);
-  virtual ~nsLocalUndoFolderListener();
 
 private:
+  virtual ~nsLocalUndoFolderListener();
   nsLocalMoveCopyMsgTxn *mTxn;
   nsIMsgFolder *mFolder;
 };
 
 #endif
--- a/mailnews/local/src/nsMailboxService.h
+++ b/mailnews/local/src/nsMailboxService.h
@@ -19,25 +19,25 @@
 #include "nsIProtocolHandler.h"
 #include "nsIRDFService.h"
 
 class nsMailboxService : public nsIMailboxService, public nsIMsgMessageService, public nsIMsgMessageFetchPartService, public nsIProtocolHandler
 {
 public:
 
   nsMailboxService();
-  virtual ~nsMailboxService();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMAILBOXSERVICE
   NS_DECL_NSIMSGMESSAGESERVICE
   NS_DECL_NSIMSGMESSAGEFETCHPARTSERVICE
   NS_DECL_NSIPROTOCOLHANDLER
 
 protected:
+  virtual ~nsMailboxService();
   bool          mPrintingOperation;
 
   // helper functions used by the service
   nsresult PrepareMessageUrl(const char * aSrcMsgMailboxURI, nsIUrlListener * aUrlListener,
                  nsMailboxAction aMailboxAction, nsIMailboxUrl ** aMailboxUrl,
                  nsIMsgWindow *msgWindow);
 
   nsresult RunMailboxUrl(nsIURI * aMailboxUrl, nsISupports * aDisplayConsumer = nullptr);
--- a/mailnews/local/src/nsMovemailService.h
+++ b/mailnews/local/src/nsMovemailService.h
@@ -12,21 +12,21 @@
 #include "nsIMovemailService.h"
 #include "nsIMsgProtocolInfo.h"
 #include "nsIMsgWindow.h"
 
 class nsMovemailService : public nsIMsgProtocolInfo, public nsIMovemailService
 {
 public:
   nsMovemailService();
-  virtual ~nsMovemailService();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMOVEMAILSERVICE
   NS_DECL_NSIMSGPROTOCOLINFO
 
   void Error(const char* errorCode, const char16_t **params, uint32_t length);
 
 private:
+  virtual ~nsMovemailService();
   nsCOMPtr<nsIMsgWindow> mMsgWindow;
 };
 
 #endif /* nsMovemailService_h___ */
--- a/mailnews/local/src/nsNoneService.h
+++ b/mailnews/local/src/nsNoneService.h
@@ -11,17 +11,18 @@
 #include "nsIMsgProtocolInfo.h"
 #include "nsINoneService.h"
 
 class nsNoneService : public nsIMsgProtocolInfo, public nsINoneService
 {
 public:
 
   nsNoneService();
-  virtual ~nsNoneService();
 
   NS_DECL_ISUPPORTS
     NS_DECL_NSIMSGPROTOCOLINFO
   NS_DECL_NSINONESERVICE
 
+private:
+  virtual ~nsNoneService();
 };
 
 #endif /* nsNoneService_h___ */
--- a/mailnews/local/src/nsParseMailbox.h
+++ b/mailnews/local/src/nsParseMailbox.h
@@ -49,17 +49,16 @@ typedef struct message_header
 class nsParseMailMessageState : public nsIMsgParseMailMsgState, public nsIDBChangeListener
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGPARSEMAILMSGSTATE
   NS_DECL_NSIDBCHANGELISTENER
 
   nsParseMailMessageState();
-  virtual               ~nsParseMailMessageState();
 
   void                  Init(uint32_t fileposition);
   virtual nsresult      ParseFolderLine(const char *line, uint32_t lineLength);
   virtual nsresult      StartNewEnvelope(const char *line, uint32_t lineLength);
   nsresult              ParseHeaders();
   nsresult              FinalizeHeaders();
   nsresult              ParseEnvelope (const char *line, uint32_t line_size);
   nsresult              InternSubject (struct message_header *header);
@@ -119,16 +118,17 @@ public:
 
   // this enables extensions to add the values of particular headers to
   // the .msf file as properties of nsIMsgHdr. It is initialized from a
   // pref, mailnews.customDBHeaders
   nsTArray<nsCString>   m_customDBHeaders;
   struct message_header *m_customDBHeaderValues;
   nsCString m_receivedValue; // accumulated received header
 protected:
+  virtual ~nsParseMailMessageState();
 };
 
 // This class is part of the mailbox parsing state machine
 class nsMsgMailboxParser : public nsIStreamListener, public nsParseMailMessageState, public nsMsgLineBuffer
 {
 public:
   nsMsgMailboxParser(nsIMsgFolder *);
   nsMsgMailboxParser();
--- a/mailnews/local/src/nsPop3IncomingServer.cpp
+++ b/mailnews/local/src/nsPop3IncomingServer.cpp
@@ -24,29 +24,29 @@
 #include "nsServiceManagerUtils.h"
 #include "nsIMutableArray.h"
 #include "nsMsgUtils.h"
 #include "nsComponentManagerUtils.h"
 #include "mozilla/Likely.h"
 
 static NS_DEFINE_CID(kCPop3ServiceCID, NS_POP3SERVICE_CID);
 
-class nsPop3GetMailChainer : public nsIUrlListener
+class nsPop3GetMailChainer MOZ_FINAL : public nsIUrlListener
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIURLLISTENER
 
   nsPop3GetMailChainer();
-  ~nsPop3GetMailChainer();
   nsresult GetNewMailForServers(nsIPop3IncomingServer** servers, uint32_t count,
                                 nsIMsgWindow *msgWindow,
                                 nsIMsgFolder *folderToDownloadTo, nsIUrlListener *listener);
   nsresult RunNextGetNewMail();
 protected:
+  ~nsPop3GetMailChainer();
   nsCOMPtr <nsIMsgFolder> m_folderToDownloadTo;
   nsCOMPtr <nsIMsgWindow> m_downloadingMsgWindow;
   nsCOMArray<nsIPop3IncomingServer> m_serversToGetNewMailFor;
   nsCOMPtr <nsIUrlListener> m_listener;
 };
 
 
 
--- a/mailnews/local/src/nsPop3Service.h
+++ b/mailnews/local/src/nsPop3Service.h
@@ -20,24 +20,24 @@ class nsIMsgMailNewsUrl;
 
 class nsPop3Service : public nsIPop3Service,
                       public nsIProtocolHandler,
                       public nsIMsgProtocolInfo
 {
 public:
 
   nsPop3Service();
-  virtual ~nsPop3Service();
   
   NS_DECL_ISUPPORTS
   NS_DECL_NSIPOP3SERVICE
   NS_DECL_NSIPROTOCOLHANDLER
   NS_DECL_NSIMSGPROTOCOLINFO
 
 protected:
+  virtual ~nsPop3Service();
   nsresult GetMail(bool downloadNewMail,
                    nsIMsgWindow* aMsgWindow, 
                    nsIUrlListener * aUrlListener,
                    nsIMsgFolder *inbox, 
                    nsIPop3IncomingServer *popServer,
                    nsIURI ** aURL);
   // convience function to make constructing of the pop3 url easier...
   nsresult BuildPop3Url(const char * urlSpec, nsIMsgFolder *inbox,
--- a/mailnews/local/src/nsPop3Sink.h
+++ b/mailnews/local/src/nsPop3Sink.h
@@ -29,27 +29,27 @@ struct partialRecord
   nsCOMPtr<nsIMsgDBHdr> m_msgDBHdr;
   nsCString m_uidl;
 };
 
 class nsPop3Sink : public nsIPop3Sink
 {
 public:
     nsPop3Sink();
-    virtual ~nsPop3Sink();
 
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSIPOP3SINK
     nsresult GetServerFolder(nsIMsgFolder **aFolder);
     nsresult FindPartialMessages();
     void CheckPartialMessages(nsIPop3Protocol *protocol);
 
     static char*  GetDummyEnvelope(void);
 
 protected:
+    virtual ~nsPop3Sink();
     nsresult WriteLineToMailbox(const nsACString& buffer);
     nsresult ReleaseFolderLock();
     nsresult HandleTempDownloadFailed(nsIMsgWindow *msgWindow);
 
     bool m_authed;
     nsCString m_accountUrl;
     uint32_t m_biffState;
     int32_t m_numNewMessages;
--- a/mailnews/local/src/nsRssService.h
+++ b/mailnews/local/src/nsRssService.h
@@ -8,17 +8,18 @@
 #include "nsIRssService.h"
 #include "nsIMsgProtocolInfo.h"
 
 class nsRssService : public nsIMsgProtocolInfo, public nsIRssService
 {
 public:
 
   nsRssService();
-  virtual ~nsRssService();
   
   NS_DECL_ISUPPORTS
   NS_DECL_NSIRSSSERVICE
   NS_DECL_NSIMSGPROTOCOLINFO
 
+private:
+  virtual ~nsRssService();
 };
 
 #endif /* nsRssService_h___ */
--- a/mailnews/mime/cthandlers/glue/nsMimeContentTypeHandler.h
+++ b/mailnews/mime/cthandlers/glue/nsMimeContentTypeHandler.h
@@ -24,24 +24,24 @@
 typedef MimeObjectClass  *
 (* MCTHCreateCTHClass)(const char *content_type, 
                        contentTypeHandlerInitStruct *initStruct);
 
 class nsMimeContentTypeHandler : public nsIMimeContentTypeHandler {
 public: 
     nsMimeContentTypeHandler (const char *aMimeType, 
                               MCTHCreateCTHClass callback);
-    virtual       ~nsMimeContentTypeHandler (void);
 
     /* this macro defines QueryInterface, AddRef and Release for this class */
     NS_DECL_ISUPPORTS 
 
     NS_IMETHOD    GetContentType(char **contentType) MOZ_OVERRIDE;
 
     NS_IMETHOD    CreateContentTypeHandlerClass(const char *content_type, 
                                                 contentTypeHandlerInitStruct *initStruct, 
                                                 MimeObjectClass **objClass) MOZ_OVERRIDE;
  private:
+    virtual ~nsMimeContentTypeHandler();
     char *mimeType;
     MCTHCreateCTHClass realCreateContentTypeHandlerClass;
 }; 
 
 #endif /* nsMimeContentTypeHandler_h_ */
--- a/mailnews/mime/cthandlers/pgpmime/nsPgpMimeProxy.cpp
+++ b/mailnews/mime/cthandlers/pgpmime/nsPgpMimeProxy.cpp
@@ -118,16 +118,17 @@ public:
   nsCOMPtr<nsIPgpMimeProxy> mimeDecrypt;
 
   MimePgpeData()
     : output_fn(nullptr),
       output_closure(nullptr)
   {
   }
 
+private:
   virtual ~MimePgpeData()
   {
   }
 };
 
 NS_IMPL_ISUPPORTS0(MimePgpeData)
 
 static void*
--- a/mailnews/mime/cthandlers/pgpmime/nsPgpMimeProxy.h
+++ b/mailnews/mime/cthandlers/pgpmime/nsPgpMimeProxy.h
@@ -33,23 +33,23 @@ public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIPGPMIMEPROXY
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
   NS_DECL_NSIREQUEST
   NS_DECL_NSIINPUTSTREAM
 
   nsPgpMimeProxy();
-  virtual ~nsPgpMimeProxy();
 
   // Define a Create method to be used with a factory:
   static NS_METHOD
   Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
 
 protected:
+  virtual ~nsPgpMimeProxy();
   bool                          mInitialized;
   nsCOMPtr<nsIStreamListener>   mDecryptor;
 
   MimeDecodeCallbackFun         mOutputFun;
   void*                         mOutputClosure;
 
   nsCOMPtr<nsILoadGroup>        mLoadGroup;
   nsLoadFlags                   mLoadFlags;
--- a/mailnews/mime/emitters/nsMimeBaseEmitter.h
+++ b/mailnews/mime/emitters/nsMimeBaseEmitter.h
@@ -49,17 +49,16 @@ typedef struct {
   char      *value;
 } headerInfoType;
 
 class nsMimeBaseEmitter : public nsIMimeEmitter,
                           public nsIInterfaceRequestor
 {
 public:
   nsMimeBaseEmitter ();
-  virtual             ~nsMimeBaseEmitter (void);
 
   // nsISupports interface
   NS_DECL_THREADSAFE_ISUPPORTS
 
   NS_DECL_NSIMIMEEMITTER
   NS_DECL_NSIINTERFACEREQUESTOR
 
   // Utility output functions...
@@ -75,16 +74,17 @@ public:
   const char          *GetHeaderValue(const char  *aHeaderName);
 
   // To write out a stored header array as HTML
   virtual nsresult            WriteHeaderFieldHTMLPrefix(const nsACString &name);
   virtual nsresult            WriteHeaderFieldHTML(const char *field, const char *value);
   virtual nsresult            WriteHeaderFieldHTMLPostfix();
 
 protected:
+  virtual ~nsMimeBaseEmitter();
   // Internal methods...
   void                CleanupHeaderArray(nsVoidArray *aArray);
 
   // For header output...
   nsresult            DumpSubjectFromDate();
   nsresult            DumpToCC();
   nsresult            DumpRestOfHeaders();
   nsresult            OutputGenericHeader(const char *aHeaderVal);
--- a/mailnews/mime/emitters/nsMimeHtmlEmitter.cpp
+++ b/mailnews/mime/emitters/nsMimeHtmlEmitter.cpp
@@ -32,27 +32,28 @@
 #include "mozilla/Services.h"
 
 #define VIEW_ALL_HEADERS 2
 
 /**
  * A helper class to implement nsIUTF8StringEnumerator
  */
 
-class nsMimeStringEnumerator : public nsIUTF8StringEnumerator {
+class nsMimeStringEnumerator MOZ_FINAL : public nsIUTF8StringEnumerator {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIUTF8STRINGENUMERATOR
 
   nsMimeStringEnumerator() : mCurrentIndex(0) {}
 
   template<class T>
   nsCString* Append(T value) { return mValues.AppendElement(value); }
 
 protected:
+  ~nsMimeStringEnumerator() {}
   nsTArray<nsCString> mValues;
   uint32_t mCurrentIndex; // consumers expect first-in first-out enumeration
 };
 
 NS_IMPL_ISUPPORTS(nsMimeStringEnumerator, nsIUTF8StringEnumerator)
 
 NS_IMETHODIMP
 nsMimeStringEnumerator::HasMore(bool *result)
--- a/mailnews/mime/src/mimecms.cpp
+++ b/mailnews/mime/src/mimecms.cpp
@@ -211,19 +211,19 @@ class nsSMimeVerificationListener : publ
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSISMIMEVERIFICATIONLISTENER
 
   nsSMimeVerificationListener(const char *aFromAddr, const char *aFromName,
                               const char *aSenderAddr, const char *aSenderName,
                               nsIMsgSMIMEHeaderSink *aHeaderSink, int32_t aMimeNestingLevel);
 
+protected:
   virtual ~nsSMimeVerificationListener() {}
   
-protected:
   /**
    * It is safe to declare this implementation as thread safe,
    * despite not using a lock to protect the members.
    * Because of the way the object will be used, we don't expect a race.
    * After construction, the object is passed to another thread,
    * but will no longer be accessed on the original thread.
    * The other thread is unable to access/modify self's data members.
    * When the other thread is finished, it will call into the "Notify"
--- a/mailnews/mime/src/nsCMS.h
+++ b/mailnews/mime/src/nsCMS.h
@@ -28,22 +28,22 @@ class nsCMSMessage : public nsICMSMessag
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSICMSMESSAGE
   NS_DECL_NSICMSMESSAGE2
 
   nsCMSMessage();
   nsCMSMessage(NSSCMSMessage* aCMSMsg);
-  virtual ~nsCMSMessage();
   nsresult Init();
 
   void referenceContext(nsIInterfaceRequestor* aContext) {m_ctx = aContext;}
   NSSCMSMessage* getCMS() {return m_cmsMsg;}
 private:
+  virtual ~nsCMSMessage();
   nsCOMPtr<nsIInterfaceRequestor> m_ctx;
   NSSCMSMessage * m_cmsMsg;
   NSSCMSSignerInfo* GetTopLevelSignerInfo();
   nsresult CommonVerifySignature(unsigned char* aDigestData, uint32_t aDigestDataLen);
 
   nsresult CommonAsyncVerifySignature(nsISMimeVerificationListener *aListener,
                                       unsigned char* aDigestData, uint32_t aDigestDataLen);
 
@@ -62,20 +62,20 @@ private:
 class nsCMSDecoder : public nsICMSDecoder,
                      public nsNSSShutDownObject
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSICMSDECODER
 
   nsCMSDecoder();
-  virtual ~nsCMSDecoder();
   nsresult Init();
 
 private:
+  virtual ~nsCMSDecoder();
   nsCOMPtr<nsIInterfaceRequestor> m_ctx;
   NSSCMSDecoderContext *m_dcx;
   virtual void virtualDestroyNSSReference();
   void destructorSafeDestroyNSSReference();
 };
 
 // ===============================================
 // nsCMSEncoder - implementation of nsICMSEncoder
@@ -86,19 +86,19 @@ private:
 class nsCMSEncoder : public nsICMSEncoder,
                      public nsNSSShutDownObject
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSICMSENCODER
 
   nsCMSEncoder();
-  virtual ~nsCMSEncoder();
   nsresult Init();
 
 private:
+  virtual ~nsCMSEncoder();
   nsCOMPtr<nsIInterfaceRequestor> m_ctx;
   NSSCMSEncoderContext *m_ecx;
   virtual void virtualDestroyNSSReference();
   void destructorSafeDestroyNSSReference();
 };
 
 #endif
--- a/mailnews/mime/src/nsCMSSecureMessage.h
+++ b/mailnews/mime/src/nsCMSSecureMessage.h
@@ -20,18 +20,18 @@
 class nsCMSSecureMessage
 : public nsICMSSecureMessage
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSICMSSECUREMESSAGE
 
   nsCMSSecureMessage();
-  virtual ~nsCMSSecureMessage();
   nsresult Init();
 
 private:
+  virtual ~nsCMSSecureMessage();
   NS_METHOD encode(const unsigned char *data, int32_t dataLen, char **_retval);
   NS_METHOD decode(const char *data, unsigned char **result, int32_t * _retval);
 };
 
 
 #endif /* _NSCMSMESSAGE_H_ */
--- a/mailnews/mime/src/nsMimeObjectClassAccess.h
+++ b/mailnews/mime/src/nsMimeObjectClassAccess.h
@@ -14,17 +14,16 @@
 
 #include "mozilla/Attributes.h"
 #include "nsISupports.h"
 #include "nsIMimeObjectClassAccess.h"
 
 class nsMimeObjectClassAccess : public nsIMimeObjectClassAccess {
 public:
   nsMimeObjectClassAccess();
-  virtual ~nsMimeObjectClassAccess();
 
   /* this macro defines QueryInterface, AddRef and Release for this class */
   NS_DECL_ISUPPORTS
 
   // These methods are all implemented by libmime to be used by
   // content type handler plugins for processing stream data.
 
   // This is the write call for outputting processed stream data.
@@ -40,11 +39,14 @@ public:
   NS_IMETHOD    GetmimeObjectClass(void **ptr) MOZ_OVERRIDE;
   NS_IMETHOD    GetmimeContainerClass(void **ptr) MOZ_OVERRIDE;
   NS_IMETHOD    GetmimeMultipartClass(void **ptr) MOZ_OVERRIDE;
   NS_IMETHOD    GetmimeMultipartSignedClass(void **ptr) MOZ_OVERRIDE;
   NS_IMETHOD    GetmimeEncryptedClass(void **ptr) MOZ_OVERRIDE;
 
   NS_IMETHOD    MimeCreate(char *content_type, void * hdrs,
                            void * opts, void**ptr) MOZ_OVERRIDE;
+
+private:
+  virtual ~nsMimeObjectClassAccess();
 };
 
 #endif /* nsMimeObjectClassAccess_h_ */
--- a/mailnews/mime/src/nsSimpleMimeConverterStub.cpp
+++ b/mailnews/mime/src/nsSimpleMimeConverterStub.cpp
@@ -154,29 +154,29 @@ MimeSimpleStubClassInitialize(MimeSimple
     oclass->finalize = Finalize;
     return 0;
 }
 
 class nsSimpleMimeConverterStub : public nsIMimeContentTypeHandler
 {
 public:
     nsSimpleMimeConverterStub(const char *aContentType) : mContentType(aContentType) { }
-    virtual ~nsSimpleMimeConverterStub() { }
 
     NS_DECL_ISUPPORTS
 
     NS_IMETHOD GetContentType(char **contentType)
     {
         *contentType = ToNewCString(mContentType);
         return *contentType ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
     }
     NS_IMETHOD CreateContentTypeHandlerClass(const char *contentType,
                                              contentTypeHandlerInitStruct *initString,
                                              MimeObjectClass **objClass);
 private:
+    virtual ~nsSimpleMimeConverterStub() { }
     nsCString mContentType;
 };
 
 NS_IMPL_ISUPPORTS(nsSimpleMimeConverterStub, nsIMimeContentTypeHandler)
 
 NS_IMETHODIMP
 nsSimpleMimeConverterStub::CreateContentTypeHandlerClass(const char *contentType,
                                                      contentTypeHandlerInitStruct *initStruct,
--- a/mailnews/mime/src/nsStreamConverter.h
+++ b/mailnews/mime/src/nsStreamConverter.h
@@ -13,17 +13,16 @@
 #include "nsIAsyncOutputStream.h"
 #include "nsIChannel.h"
 #include "nsStringGlue.h"
 #include "nsCOMPtr.h"
 
 class nsStreamConverter : public nsIStreamConverter, public nsIMimeStreamConverter {
 public:
   nsStreamConverter();
-  virtual ~nsStreamConverter();
 
   NS_DECL_THREADSAFE_ISUPPORTS
 
   // nsIMimeStreamConverter support
   NS_DECL_NSIMIMESTREAMCONVERTER
   // nsIStreamConverter methods
   NS_DECL_NSISTREAMCONVERTER
   // nsIStreamListener methods
@@ -37,16 +36,17 @@ public:
   ////////////////////////////////////////////////////////////////////////////
   NS_IMETHOD Init(nsIURI *aURI, nsIStreamListener * aOutListener, nsIChannel *aChannel);
   NS_IMETHOD GetContentType(char **aOutputContentType);
   NS_IMETHOD InternalCleanup(void);
   NS_IMETHOD DetermineOutputFormat(const char *url, nsMimeOutputType *newType);
   NS_IMETHOD FirePendingStartRequest(void);
 
 private:
+  virtual ~nsStreamConverter();
   nsresult Close();
 
   // the input and output streams form a pipe...they need to be passed around together..
   nsCOMPtr<nsIAsyncOutputStream>     mOutputStream;     // output stream
   nsCOMPtr<nsIAsyncInputStream>      mInputStream;
 
   nsCOMPtr<nsIStreamListener>   mOutListener;   // output stream listener
   nsCOMPtr<nsIChannel>          mOutgoingChannel;
--- a/mailnews/news/src/nsNNTPArticleList.h
+++ b/mailnews/news/src/nsNNTPArticleList.h
@@ -12,22 +12,23 @@
 #include "nsIMsgDatabase.h"
 #include "MailNewsTypes.h"
 #include "nsTArray.h"
 
 class nsNNTPArticleList : public nsINNTPArticleList
 {
 public:
   nsNNTPArticleList();
-  virtual ~nsNNTPArticleList();
 
     NS_DECL_ISUPPORTS
     NS_DECL_NSINNTPARTICLELIST
 
 protected:
+  virtual ~nsNNTPArticleList();
+
     nsTArray<nsMsgKey> m_idsInDB;
 
 #ifdef DEBUG
     nsTArray<nsMsgKey> m_idsOnServer;
 #endif
     nsTArray<nsMsgKey> m_idsDeleted;
 
     nsCOMPtr <nsIMsgNewsFolder> m_newsFolder;
--- a/mailnews/news/src/nsNNTPNewsgroupList.h
+++ b/mailnews/news/src/nsNNTPNewsgroupList.h
@@ -49,22 +49,23 @@ typedef struct MSG_NewsKnown {
 // related messages get passed to this object.
 class nsNNTPNewsgroupList : public nsINNTPNewsgroupList, public nsIMsgFilterHitNotify
 #ifdef HAVE_CHANGELISTENER
 /* ,public ChangeListener */
 #endif
 {
 public:
   nsNNTPNewsgroupList();
-  virtual  ~nsNNTPNewsgroupList();
   NS_DECL_ISUPPORTS
   NS_DECL_NSINNTPNEWSGROUPLIST
   NS_DECL_NSIMSGFILTERHITNOTIFY
 
 private:
+  virtual  ~nsNNTPNewsgroupList();
+
   NS_METHOD CleanUp();
      
   bool    m_finishingXover;
 
 #ifdef HAVE_CHANGELISTENER
   virtual void OnAnnouncerGoingAway (ChangeAnnouncer *instigator);
 #endif
   nsresult ParseLine(char *line, uint32_t *message_number);
--- a/mailnews/news/src/nsNNTPNewsgroupPost.h
+++ b/mailnews/news/src/nsNNTPNewsgroupPost.h
@@ -41,17 +41,16 @@
 
 // keep this in sync with the above
 #define HEADER_LAST                 IDX_HEADER_MESSAGEID
 
 class nsNNTPNewsgroupPost : public nsINNTPNewsgroupPost {
     
 public:
     nsNNTPNewsgroupPost();
-    virtual ~nsNNTPNewsgroupPost();
     
     NS_DECL_ISUPPORTS
     
     // Required headers
     NS_IMPL_CLASS_GETSET_STR(RelayVersion, m_header[IDX_HEADER_RELAYVERSION])
     NS_IMPL_CLASS_GETSET_STR(PostingVersion, m_header[IDX_HEADER_POSTINGVERSION])
     NS_IMPL_CLASS_GETSET_STR(From, m_header[IDX_HEADER_FROM])
     NS_IMPL_CLASS_GETSET_STR(Date, m_header[IDX_HEADER_DATE])
@@ -77,16 +76,18 @@ public:
     // the message can be stored in a file....allow accessors for getting and setting
     // the file name to post...
     NS_IMETHOD SetPostMessageFile(nsIFile * aFile);
     NS_IMETHOD GetPostMessageFile(nsIFile ** aFile);
 
     NS_IMETHOD AddNewsgroup(const char *newsgroupName);
     
 private:
+    virtual ~nsNNTPNewsgroupPost();
+
     nsCOMPtr <nsIFile> m_postMessageFile;
     char *m_header[HEADER_LAST+1];
     char *m_body;
     char *m_messageBuffer;
     bool m_isControl;
 };
 
 #endif /* __nsNNTPNewsgroupPost_h */
--- a/mailnews/news/src/nsNNTPProtocol.cpp
+++ b/mailnews/news/src/nsNNTPProtocol.cpp
@@ -537,20 +537,20 @@ NS_IMETHODIMP nsNNTPProtocol::LoadNewsUr
 class nsNntpCacheStreamListener : public nsIStreamListener
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
 
   nsNntpCacheStreamListener ();
-  virtual ~nsNntpCacheStreamListener();
 
   nsresult Init(nsIStreamListener * aStreamListener, nsIChannel* channel, nsIMsgMailNewsUrl *aRunningUrl);
 protected:
+  virtual ~nsNntpCacheStreamListener();
     nsCOMPtr<nsIChannel> mChannelToUse;
   nsCOMPtr<nsIStreamListener> mListener;
   nsCOMPtr<nsIMsgMailNewsUrl> mRunningUrl;
 };
 
 NS_IMPL_ADDREF(nsNntpCacheStreamListener)
 NS_IMPL_RELEASE(nsNntpCacheStreamListener)
 
--- a/mailnews/news/src/nsNewsDownloadDialogArgs.h
+++ b/mailnews/news/src/nsNewsDownloadDialogArgs.h
@@ -8,22 +8,23 @@
 
 #include "nsINewsDownloadDialogArgs.h"
 #include "nsStringGlue.h"
 
 class nsNewsDownloadDialogArgs : public nsINewsDownloadDialogArgs
 {
 public:
   nsNewsDownloadDialogArgs();
-  virtual ~nsNewsDownloadDialogArgs();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSINEWSDOWNLOADDIALOGARGS
 
 private:
+  virtual ~nsNewsDownloadDialogArgs();
+
   nsString mGroupName;
   int32_t mArticleCount;
   nsCString mServerKey;
   bool mHitOK;
   bool mDownloadAll;
 };
 
 #endif // nsNewsDownloadDialogArgs_h__
--- a/mailnews/news/src/nsNewsDownloader.h
+++ b/mailnews/news/src/nsNewsDownloader.h
@@ -16,27 +16,28 @@
 #include "nsIMsgSearchSession.h"
 
 // base class for downloading articles in a single newsgroup. Keys to download are passed in
 // to DownloadArticles method.
 class nsNewsDownloader : public nsIUrlListener, public nsIMsgSearchNotify
 {
 public:
   nsNewsDownloader(nsIMsgWindow *window, nsIMsgDatabase *db, nsIUrlListener *listener);
-  virtual ~nsNewsDownloader();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIURLLISTENER
   NS_DECL_NSIMSGSEARCHNOTIFY
 
   virtual nsresult DownloadArticles(nsIMsgWindow *window, nsIMsgFolder *folder, nsTArray<nsMsgKey> *pKeyArray);
 
   bool ShouldAbort() const { return m_abort; }
 
 protected:
+  virtual ~nsNewsDownloader();
+
   virtual int32_t Write(const char * /*block*/, int32_t length) {return length;}
   virtual void Abort();
   virtual void Complete();
   virtual bool GetNextHdrToRetrieve();
   virtual nsresult DownloadNext(bool firstTimeP);
   virtual int32_t FinishDownload() {return 0;}
   virtual int32_t  StartDownload() {return 0;}
   virtual nsresult ShowProgress(const char16_t *progressString, int32_t percent);
@@ -91,24 +92,25 @@ protected:
 };
 
 // this class iterates all the news servers for each group on the server that's configured for
 // offline use, downloads the messages that meet the download criteria for that newsgroup/server
 class nsMsgDownloadAllNewsgroups : public nsIUrlListener
 {
 public:
   nsMsgDownloadAllNewsgroups(nsIMsgWindow *window, nsIUrlListener *listener);
-  virtual ~nsMsgDownloadAllNewsgroups();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIURLLISTENER
 
   nsresult ProcessNextGroup();
 
 protected:
+  virtual ~nsMsgDownloadAllNewsgroups();
+
   bool     AdvanceToNextServer();
   bool     AdvanceToNextGroup();
   nsresult DownloadMsgsForCurrentGroup();
 
   DownloadMatchingNewsArticlesToNewsDB *m_downloaderForGroup;
 
   nsCOMPtr <nsIMsgFolder> m_currentFolder;
   nsCOMPtr <nsIMsgWindow> m_window;
--- a/mailnews/news/src/nsNntpMockChannel.h
+++ b/mailnews/news/src/nsNntpMockChannel.h
@@ -19,20 +19,21 @@ class nsNntpMockChannel : public nsIChan
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSICHANNEL
   NS_DECL_NSIREQUEST
 
   nsNntpMockChannel(nsIURI *aUri, nsIMsgWindow *aMsgWindow);
   nsNntpMockChannel(nsIURI *aUri, nsIMsgWindow *aMsgWindow,
                     nsISupports *aConsumer);
-  virtual ~nsNntpMockChannel();
 
   nsresult AttachNNTPConnection(nsNNTPProtocol &protocol);
 protected:
+  virtual ~nsNntpMockChannel();
+
   // The URL we will be running
   nsCOMPtr<nsIURI> m_url;
 
   // Variables for arguments to pass into the opening phase.
   nsCOMPtr<nsIStreamListener> m_channelListener;
   nsCOMPtr<nsISupports> m_context;
   nsCOMPtr<nsIMsgWindow> m_msgWindow;
 
--- a/mailnews/news/src/nsNntpService.h
+++ b/mailnews/news/src/nsNntpService.h
@@ -41,19 +41,20 @@ public:
   NS_DECL_NSIPROTOCOLHANDLER
   NS_DECL_NSIMSGPROTOCOLINFO
   NS_DECL_NSICONTENTHANDLER
   NS_DECL_NSIMSGMESSAGEFETCHPARTSERVICE
   NS_DECL_NSICOMMANDLINEHANDLER
 
   // nsNntpService
   nsNntpService();
+
+protected:
   virtual ~nsNntpService();
 
-protected:
   nsresult GetNntpServerByAccount(const char *aAccountKey, nsIMsgIncomingServer **aNntpServer);
   nsresult SetUpNntpUrlForPosting(const char *aAccountKey, char **newsUrlSpec);
   nsresult FindHostFromGroup(nsCString &host, nsCString &groupName);
   nsresult FindServerWithNewsgroup(nsCString &host, nsCString &groupName);
 
   nsresult CreateMessageIDURL(nsIMsgFolder *folder, nsMsgKey key, char **url);
   nsresult GetMessageFromUrl(nsIURI *aUrl, nsIMsgWindow *aMsgWindow, nsISupports *aDisplayConsumer);
   // a convience routine used to put together news urls