Commit 73aa418e authored by Vinicius Jarina's avatar Vinicius Jarina
Browse files

Revert "Fix leaking a Lua object when a managed Lua object wrapper is...

Revert "Fix leaking a Lua object when a managed Lua object wrapper is finalized without being disposed"

This reverts commit 0e1211fa.
parent ce5b6079
...@@ -56,8 +56,10 @@ namespace NLua ...@@ -56,8 +56,10 @@ namespace NLua
public virtual void Dispose (bool disposeManagedResources) public virtual void Dispose (bool disposeManagedResources)
{ {
if (!_Disposed) { if (!_Disposed) {
if (_Reference != 0) if (disposeManagedResources) {
_Interpreter.dispose (_Reference); if (_Reference != 0)
_Interpreter.dispose (_Reference);
}
_Interpreter = null; _Interpreter = null;
_Disposed = true; _Disposed = true;
...@@ -78,4 +80,4 @@ namespace NLua ...@@ -78,4 +80,4 @@ namespace NLua
return _Reference; return _Reference;
} }
} }
} }
\ No newline at end of file
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