Is there any particular reason why this loop here would cause a memory leak?
While ProcessStatus(GameProcess) <> 0
ClipText=TextFromClipboard()
If ClipText = "nwjsLoaded"
If GraphicsModeExists(1366,768,0,0) And (1366 <> DesktopWidth() Or 768 <> DesktopHeight())
ChangeDisplayMode(1366,768,DesktopDepth(),DesktopHertz ())
EndIf
EmptyClipboard()
EndIf
Wend
EDIT:
Okay I think I got it sorted.