Lua - fix memory leaks

This commit is contained in:
adelikat 2012-10-06 18:39:38 +00:00
parent 03e4403b9c
commit f8a962294a
1 changed files with 38 additions and 29 deletions

View File

@ -839,6 +839,8 @@ namespace BizHawk.MultiClient
/// </summary> /// </summary>
/// <param name="includeFrameWaiters">should frame waiters be waken up? only use this immediately before a frame of emulation</param> /// <param name="includeFrameWaiters">should frame waiters be waken up? only use this immediately before a frame of emulation</param>
public void ResumeScripts(bool includeFrameWaiters) public void ResumeScripts(bool includeFrameWaiters)
{
if (luaList != null && luaList.Count > 0)
{ {
if (LuaImp.luaSurface == null) if (LuaImp.luaSurface == null)
{ {
@ -875,18 +877,25 @@ namespace BizHawk.MultiClient
else MessageBox.Show(ex.ToString()); else MessageBox.Show(ex.ToString());
} }
} }
}
//LuaImp.gui_drawFinishEmu(); //LuaImp.gui_drawFinishEmu();
} }
public void StartLuaDrawing() public void StartLuaDrawing()
{
if (luaList != null && luaList.Count > 0)
{ {
LuaImp.gui_drawNewEmu(); LuaImp.gui_drawNewEmu();
} }
}
public void EndLuaDrawing() public void EndLuaDrawing()
{
if (luaList != null && luaList.Count > 0)
{ {
LuaImp.gui_drawFinishEmu(); LuaImp.gui_drawFinishEmu();
} }
}
public bool IsRunning() public bool IsRunning()
{ {