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

后端 未结 14 1754
无人共我
无人共我 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:40

    I think it used to be a common misunderstanding among former C/C++ developers. They knew that the GC will free their memory, but they didn't really understand when and how. Just clean it and carry on :)

提交回复
热议问题