From 95b061106b94365b9f527dc789a1e0dcfd846c70 Mon Sep 17 00:00:00 2001 From: Alec Miller Date: Thu, 4 May 2023 17:03:55 -0700 Subject: [PATCH] kram - fix win thumbs --- kram-thumb-win/Dll.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kram-thumb-win/Dll.cpp b/kram-thumb-win/Dll.cpp index 301ff587..7d13f5ac 100644 --- a/kram-thumb-win/Dll.cpp +++ b/kram-thumb-win/Dll.cpp @@ -86,12 +86,16 @@ class CClassFactory : public IClassFactory { return hr; } - virtual CClassFactory(PFNCREATEINSTANCE pfnCreate) + CClassFactory(PFNCREATEINSTANCE pfnCreate) : mReferences(1) , mCreateFunc(pfnCreate) { DllAddRef(); } + virtual ~CClassFactory() { + DllRelease(); + } + // IUnknown IFACEMETHODIMP QueryInterface(REFIID riid, void** ppv) { static const QITAB qit[] = { @@ -128,10 +132,6 @@ class CClassFactory : public IClassFactory { } private: - ~CClassFactory() { - DllRelease(); - } - std::atomic_long mReferences; PFNCREATEINSTANCE mCreateFunc; };