Where did variable = null as “object destroying” come from?

后端 未结 14 1841
无人共我
无人共我 2021-02-18 15:51

Working on a number of legacy systems written in various versions of .NET, across many different companies, I keep finding examples of the following pattern:

pub         


        
14条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-18 16:37

    I've seen this in some Java code before. It was used on a static variable to signal that the object should be destroyed.

    It probably didn't originate from Java though, as using it for anything other than a static variable would also not make sense in Java.

提交回复
热议问题