Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
NLua
Commits
0e1211fa
Commit
0e1211fa
authored
May 21, 2013
by
Chris Howie
Browse files
Fix leaking a Lua object when a managed Lua object wrapper is finalized without being disposed
parent
206e1f84
Changes
1
Hide whitespace changes
Inline
Side-by-side
Core/NLua/LuaBase.cs
View file @
0e1211fa
...
@@ -56,10 +56,8 @@ namespace NLua
...
@@ -56,10 +56,8 @@ namespace NLua
public
virtual
void
Dispose
(
bool
disposeManagedResources
)
public
virtual
void
Dispose
(
bool
disposeManagedResources
)
{
{
if
(!
_Disposed
)
{
if
(!
_Disposed
)
{
if
(
disposeManagedResources
)
{
if
(
_Reference
!=
0
)
if
(
_Reference
!=
0
)
_Interpreter
.
dispose
(
_Reference
);
_Interpreter
.
dispose
(
_Reference
);
}
_Interpreter
=
null
;
_Interpreter
=
null
;
_Disposed
=
true
;
_Disposed
=
true
;
...
@@ -80,4 +78,4 @@ namespace NLua
...
@@ -80,4 +78,4 @@ namespace NLua
return
_Reference
;
return
_Reference
;
}
}
}
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment