我在FCL代码中发现了一个不寻常的样本.
这是System.IO.BinaryReader中的方法:
protected virtual void Dispose(bool disposing) {
if (disposing) {
Stream copyOfStream = m_stream;
m_stream = null;
if (copyOfStream != null && !m_leaveOpen)
copyOfStream.Close();
}
m_stream = null;
m_buffer = null;
m_decoder = null;
m_charBytes = null;
m_singleChar = null;
m_charBuffer = null;
}
Run Code Online (Sandbox Code Playgroud)
"copyOfStream"对执行逻辑有什么影响?