Fix minor memory leaks
The delete keyword only calls a single destructor, the delete[] keyword calls as many destructors as there are members of the array.
This commit is contained in:
@@ -89,7 +89,7 @@ void KeyboardInputWindows::sendKeyboardInput(QString input)
|
||||
}
|
||||
|
||||
sendKeyboardInputRaw(ii, ips);
|
||||
delete ips;
|
||||
delete[] ips;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ void KeyboardInputWindows::sendKeyboardEnter()
|
||||
fillKiStruct(ips[1], VK_RETURN, true);
|
||||
|
||||
sendKeyboardInputRaw(2, ips);
|
||||
delete ips;
|
||||
delete[] ips;
|
||||
}
|
||||
|
||||
void KeyboardInputWindows::sendKeyboardBackspace(int count)
|
||||
@@ -114,7 +114,7 @@ void KeyboardInputWindows::sendKeyboardBackspace(int count)
|
||||
}
|
||||
|
||||
sendKeyboardInputRaw(count * 2, ips);
|
||||
delete ips;
|
||||
delete[] ips;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ void KeyboardInputWindows::sendKeyboardAltTab()
|
||||
fillKiStruct(ips[3], VK_MENU, true);
|
||||
|
||||
sendKeyboardInputRaw(4, ips);
|
||||
delete ips;
|
||||
delete[] ips;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user