Run a GC before and after streaming
This commit is contained in:
parent
dcbf5affda
commit
8031ed7fe1
1 changed files with 10 additions and 0 deletions
|
|
@ -97,6 +97,11 @@ Item {
|
||||||
streamSegueErrorDialog.open()
|
streamSegueErrorDialog.open()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Garbage collect the Session object since it's pretty heavyweight
|
||||||
|
// and keeps other libraries (like SDL_TTF) around until it is deleted.
|
||||||
|
session = null
|
||||||
|
gc()
|
||||||
}
|
}
|
||||||
|
|
||||||
StackView.onDeactivating: {
|
StackView.onDeactivating: {
|
||||||
|
|
@ -153,6 +158,11 @@ Item {
|
||||||
// Stop GUI gamepad usage now
|
// Stop GUI gamepad usage now
|
||||||
SdlGamepadKeyNavigation.disable()
|
SdlGamepadKeyNavigation.disable()
|
||||||
|
|
||||||
|
// Garbage collect QML stuff before we start streaming,
|
||||||
|
// since we'll probably be streaming for a while and we
|
||||||
|
// won't be able to GC during the stream.
|
||||||
|
gc()
|
||||||
|
|
||||||
// Run the streaming session to completion
|
// Run the streaming session to completion
|
||||||
session.exec(Screen.virtualX, Screen.virtualY)
|
session.exec(Screen.virtualX, Screen.virtualY)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue