Skip to content

Commit 721e594

Browse files
committed
Fixed memory leaked caused by gamepad
1 parent e437246 commit 721e594

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

InputState.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ void InputState::Deinitialize() {
3636
pDelete( m_KeyboardState );
3737
m_KeyboardState = nullptr;
3838
}
39+
for ( auto& gamepad : m_Gamepads ) {
40+
if ( gamepad ) {
41+
pDelete( gamepad );
42+
}
43+
}
3944
}
4045

4146
void InputState::Update() {

0 commit comments

Comments
 (0)