For two objects to be identical, they have to be the same object in memory.
两个对象要相同,它们必须在内存中是同一个对象。
As we hinted in our last example, objects are only identical if they refer to the same object in memory.
正如在上一个示例所暗示的,只有在这些对象引用内存中同一个对象时,它们才是相同的。
A web server that is storing an object in memory will likely respond to a request faster than a web server that needs to read the file from disk.
在内存中存储某个对象的Web服务器可能会比其他需要从磁盘读取文件的Web服务器更快地响应一个请求。
Furthermore, an object in memory can be referenced by multiple references that could be strong, soft, weak, or phantom. Before proceeding further, let's look at some terminology.
而且,内存中的一个对象可以被多个引用(可以是强引用、软引用、弱引用或虚引用)引用。
Is there a way to compress an object in memory and use it transparently?
有没有一种方法来压缩内存中的对象和透明地使用它吗?
In this example, if you execute different queries that return the same row from the database, you receive a reference to the same object in memory every time.
在此示例中,如果您执行返回数据库中同一行的不同查询,则您每次都会收到对内存中同一对象的引用。
In this example, if you execute different queries that return the same row from the database, you receive a reference to the same object in memory every time.
在此示例中,如果您执行返回数据库中同一行的不同查询,则您每次都会收到对内存中同一对象的引用。
应用推荐