软件构造第八章(未完待续)

每个线程都有其自己的栈,管理其局部数据,各栈之间彼此不可见

所有局部的基本数据类型都在栈上创建(All local variables of primitive types (boolean, byte, short,char, int, …) are fully stored on the thread stack and are thusnot visible to other threads)

多线程之间传递数据是通过复制而非引用

所有new创建的对象的内存都在堆上面分配(The heap contains all objects created in Java application,regardless of what thread created the object)

It does not matter if an object was created and assigned to a local variable,or created as a member variable of another object, the object is still storedon the heap. 即使是局部变量的object,也是在堆上创创建

软件构造第八章(未完待续)

软件构造第八章(未完待续)

来源:cswenboli

声明:本站部分文章及图片转载于互联网,内容版权归原作者所有,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2018年5月20日
下一篇 2018年5月20日

相关推荐