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

前端 未结 14 780
感动是毒
感动是毒 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:31

    - Do you always assign null to an object after its scope has been reached?

    No

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

    Yes

    - Do you do it for all sort of applications regardless of their length?

    Yes

    - If so, is it always a good practice?

    N/A

提交回复
热议问题