Commit 8bf1a2f2 authored by capresti@gmail.com's avatar capresti@gmail.com
Browse files

- Marked LuaBase as IDisposable, set the _Interpreter variable to null on Dispose

git-svn-id: http://luainterface.googlecode.com/svn/trunk@31 63eb109e-e254-0410-a61e-ed0b8f8614f5
parent cdb47782
......@@ -7,7 +7,7 @@ namespace LuaInterface
/// <summary>
/// Base class to provide consistent disposal flow across lua objects. Uses code provided by Yves Duhoux and suggestions by Hans Schmeidenbacher and Qingrui Li
/// </summary>
public abstract class LuaBase
public abstract class LuaBase : IDisposable
{
private bool _Disposed;
protected int _Reference;
......@@ -33,7 +33,7 @@ namespace LuaInterface
if (_Reference != 0)
_Interpreter.dispose(_Reference);
}
_Interpreter = null;
_Disposed = true;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment