Whats up with static memory in java?

前端 未结 6 490
情深已故
情深已故 2020-12-02 19:17

This question is for the java language in particular. I understand that there is a static protion of memory set aside for all static code.

My question is how is this

6条回答
  •  离开以前
    2020-12-02 19:43

    The initialization of static variables is covered in Section 2.11 Static Initializers of suns JVM spec. The specification does not define the implementation of Garbage collection however so I imagine that garbage collection rules for static objects will vary depending on your VM.

提交回复
热议问题