亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

java - What happens to the value of a static variable in Android after it is recycled?
大家講道理
大家講道理 2017-05-27 17:40:18
0
2
739

for example

public static String APP_NAME = "segmentFault";

When APP_NAME is recycled, will the value of APP_NAME become null, or an uncertain mess of values?

大家講道理
大家講道理

光陰似箭催人老,日月如移越少年。

reply all(2)
阿神

There is a problem with your understanding of memory recycling. Object recycling first no longer refers to a certain memory address, and the GC reclaims the memory instead of recycling the memory first, causing the variable to be null

PHPzhong

Static members will not be recycled. The author does not have to worry about the values ??of static members changing inexplicably. If there is no other assignment to APP_NAME in the code, its value will always be "segmentFault".

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template