Tag: gc roots

GC根和局部变量

在查看Timer文档时,我使用以下注释运行了以下示例: // Normally, the timer is declared at the class level, // so that it stays in scope as long as it is needed. // If the timer is declared in a long-running method, // KeepAlive must be used to prevent the JIT compiler // from allowing aggressive garbage collection to occur // before the […]