Fixing memory leaks in controllers
This commit is contained in:
parent
aa59c6132e
commit
dba814215d
165 changed files with 444 additions and 71 deletions
|
|
@ -40,6 +40,11 @@ RGBController_SapphireNitroGlowV1::RGBController_SapphireNitroGlowV1(SapphireNit
|
|||
active_mode = 0;
|
||||
}
|
||||
|
||||
RGBController_SapphireNitroGlowV1::~RGBController_SapphireNitroGlowV1()
|
||||
{
|
||||
delete sapphire;
|
||||
}
|
||||
|
||||
void RGBController_SapphireNitroGlowV1::SetupZones()
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
|
|
@ -102,4 +107,4 @@ void RGBController_SapphireNitroGlowV1::SetCustomMode()
|
|||
void RGBController_SapphireNitroGlowV1::DeviceUpdateMode()
|
||||
{
|
||||
sapphire->SetMode((unsigned char)modes[(unsigned int)active_mode].value, (unsigned char)modes[(unsigned int)active_mode].speed);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ class RGBController_SapphireNitroGlowV1 : public RGBController
|
|||
{
|
||||
public:
|
||||
RGBController_SapphireNitroGlowV1(SapphireNitroGlowV1Controller* sapphire_ptr);
|
||||
~RGBController_SapphireNitroGlowV1();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
|
|
@ -30,4 +31,4 @@ public:
|
|||
|
||||
private:
|
||||
SapphireNitroGlowV1Controller* sapphire;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -75,6 +75,11 @@ RGBController_SapphireNitroGlowV3::RGBController_SapphireNitroGlowV3(SapphireNit
|
|||
active_mode = 0;
|
||||
}
|
||||
|
||||
RGBController_SapphireNitroGlowV3::~RGBController_SapphireNitroGlowV3()
|
||||
{
|
||||
delete sapphire;
|
||||
}
|
||||
|
||||
void RGBController_SapphireNitroGlowV3::SetupZones()
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
|
|
@ -137,4 +142,4 @@ void RGBController_SapphireNitroGlowV3::SetCustomMode()
|
|||
void RGBController_SapphireNitroGlowV3::DeviceUpdateMode()
|
||||
{
|
||||
sapphire->SetMode((unsigned char)modes[(unsigned int)active_mode].value, (unsigned char)modes[(unsigned int)active_mode].speed);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ class RGBController_SapphireNitroGlowV3 : public RGBController
|
|||
{
|
||||
public:
|
||||
RGBController_SapphireNitroGlowV3(SapphireNitroGlowV3Controller* sapphire_ptr);
|
||||
~RGBController_SapphireNitroGlowV3();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
|
|
@ -30,4 +31,4 @@ public:
|
|||
|
||||
private:
|
||||
SapphireNitroGlowV3Controller* sapphire;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue