Delete zone matrix maps when destroying RGBController
This commit is contained in:
parent
32938ec2af
commit
5fdea9d34f
1 changed files with 16 additions and 0 deletions
|
|
@ -22,6 +22,22 @@ RGBController::~RGBController()
|
|||
{
|
||||
DeviceThreadRunning = false;
|
||||
DeviceCallThread->join();
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Delete the matrix map |
|
||||
\*---------------------------------------------------------*/
|
||||
for(int zone_index = 0; zone_index < zones.size(); zone_index++)
|
||||
{
|
||||
if(zones[zone_index].matrix_map != NULL)
|
||||
{
|
||||
if(zones[zone_index].matrix_map->map != NULL)
|
||||
{
|
||||
delete[] zones[zone_index].matrix_map->map;
|
||||
}
|
||||
|
||||
delete zones[zone_index].matrix_map;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsigned char * RGBController::GetDeviceDescription()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue