实质就是解决几个问题
item | Store location | |
---|---|---|
Local variables | Stack | |
Local static variables | Stack | |
member variable | heap | 作为对象的属性,存在于heap中 |
static member variable | heap | |
method | Stack | |
Static method | Stack | |
New Object() | Heap |
http://tutorials.jenkov.com/java-concurrency/java-memory-model.html
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。