mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-23 21:55:34 +08:00
(Dispose): dispose of members only when 'disposing' argument is true.
This commit is contained in:
parent
a47817101e
commit
d1ac47ad03
@ -180,7 +180,8 @@ namespace GameRes.Formats
|
|||||||
{
|
{
|
||||||
if (!disposed)
|
if (!disposed)
|
||||||
{
|
{
|
||||||
m_stream.Dispose();
|
if (disposing)
|
||||||
|
m_stream.Dispose();
|
||||||
disposed = true;
|
disposed = true;
|
||||||
base.Dispose (disposing);
|
base.Dispose (disposing);
|
||||||
}
|
}
|
||||||
@ -278,7 +279,7 @@ namespace GameRes.Formats
|
|||||||
{
|
{
|
||||||
if (!m_disposed)
|
if (!m_disposed)
|
||||||
{
|
{
|
||||||
if (m_should_dispose)
|
if (m_should_dispose && disposing)
|
||||||
m_stream.Dispose();
|
m_stream.Dispose();
|
||||||
m_disposed = true;
|
m_disposed = true;
|
||||||
base.Dispose (disposing);
|
base.Dispose (disposing);
|
||||||
|
Loading…
Reference in New Issue
Block a user