View Issue Details

IDProjectCategoryView StatusLast Update
00033363 - Current Dev ListBugpublic2019-08-07 02:49
ReporterK7ZCZAssigned Todoug 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version6.6.0.239 
Summary0003336: LicenseManager class recreates, then leaks itself
DescriptionI noticed that the QLM License code instantiates the license manager twice. I'm not sure why it needs to do so.

The LicenseValdiator::ValidateOnServer() method is non-static. When called, it ends up executing this code:

     if ((activationKey.Length() > 0) && (computerKey.Length() > 0))
     {
         LicenseValidator *lv = new LicenseValidator();
         _bstr_t _returnMsg = lv->license->ValidateLicense(_bstr_t(activationKey));
         licenseType = lv->license->LicenseType;
     }


It seems odd that a method of LicenseValidator would create a new LicenseValidator, but that's what's happening here. Why?

If there's a good reason, that's fine; but it seems like something that should be commented and explained. I also have to wonder why the code leaks the locally created LicenseValidator instance; why doesn't it delete the object, or use a smart pointer object to manage its lifecycle?
TagsNo tags attached.
ModuleSW License Mgmt
Sub-ModuleSW License Client
TestingNot Started

Activities

doug

2019-06-10 23:37

developer   ~0008037

Agree, no idea why it was like that. Testing just use local method works fine so I changed it.

There is a comment there, but I think it was back when Eric was making a more complicated version of this.

WA9PIE

2019-06-22 11:16

administrator   ~0008166

Is this fixed and checked-in?

doug

2019-06-23 17:05

developer   ~0008182

yes, fixed and checked in and in the last few builds

Issue History

Date Modified Username Field Change
2019-06-08 09:03 K7ZCZ New Issue
2019-06-09 19:02 WA9PIE Module (select) => QLM
2019-06-09 19:04 WA9PIE Sub-Module (select) => Software License Key System
2019-06-10 23:37 doug Note Added: 0008037
2019-06-13 14:47 WA9PIE Module QLM => SW License Mgmt
2019-06-15 11:21 WA9PIE Sub-Module Software License Key System => SW License Client
2019-06-15 23:18 WA9PIE Assigned To => doug
2019-06-15 23:18 WA9PIE Status new => assigned
2019-06-22 11:16 WA9PIE Note Added: 0008166
2019-06-23 17:05 doug Status assigned => resolved
2019-06-23 17:05 doug Resolution open => fixed
2019-06-23 17:05 doug Note Added: 0008182
2019-08-07 02:49 WA9PIE Fixed in Version => 6.6.0.239