参见英文答案 >
Understanding garbage collection in .NET3个
从
从
GC.KeepAlive()
on MSDN开始:
Code this method at the end,not the beginning,of the range of
instructions where obj must be available.
为什么会出现这种非直观的行为?