Home > Q&A > body text
生命周期更长的静态变量持有旧context会导致context无法释放造成泄漏,那能不能通过将静态变量置为null来解决?
ringa_lee2017-04-17 17:26:59
This is OK if there is no other object referencing this context.
PHPz2017-04-17 17:26:59
You can use weak references.
巴扎黑2017-04-17 17:26:59
It can be released, but in such cases, application context will generally be considered