在下面的代碼不工作: class ExampleClass
def initialize
ObjectSpace.define_finalizer(self, proc{puts 'dead'})
end
end
ex = ExampleClass.new
ex = nil
GC.start
while true
# the while lo
我目前正在嘗試使用System.Threading.Timer來爲我當前的類啓用回調。我現在的階級是這樣的: public class TestClass
{
private Timer _timer;
public TestClass()
{
_timer = new Timer(Callback, TimeSpan.FromMinutes(5),
假設我有一個C#方法是這樣的:(顯然不是真正的代碼) byte[] foo()
{
var a = MethodThatReturns500mbObject();
var b = MethodThatReturns200mbObject(a);
byte[] c = MethodThatReturns150mbByteArray(b);
byte[] d