Assigning “null” to objects in every application after their use

前端 未结 14 778
感动是毒
感动是毒 2021-01-18 12:05
  • Do you always assign null to an object after its scope has been reached?

  • Or do you rely on the JVM for garbage collection?

14条回答
  •  悲哀的现实
    2021-01-18 12:33

    When using the .Net I don't think there's a need to set the object to null. Just let the garbage collection happen.

提交回复
热议问题