As we hinted in our last example, objects are only identical if they refer to the same object in memory.
正如在上一个示例所暗示的,只有在这些对象引用内存中同一个对象时,它们才是相同的。
In this example, if you execute the same query two times, you receive a reference to the same object in memory every time.
在这个范例中,如果执行相同的查询两次,则每次都会接收到记忆体中相同物件的参考。
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服务器更快地响应一个请求。
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.
在此示例中,如果您执行返回数据库中同一行的不同查询,则您每次都会收到对内存中同一对象的引用。
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.
而且,内存中的一个对象可以被多个引用(可以是强引用、软引用、弱引用或虚引用)引用。
The object of great interest at the temple was a large marble tower built in memory of Buddha.
那庙里使人极感兴趣的东西是一座为纪念佛陀而修建的大理石巨塔。
This approach to serialization forces a string representation of the entire object to be created in memory before a single character can be written, which is a big performance drag for large objects.
这种序列化方式强行在写入一个字符之前在内存中建立整个对象的字符串表示,对于大型对象来说,这是个非常大的性能拖累。
The issue was caused by a custom tag engine, that kept large object lists in memory.
问题是由自定义标签引擎引起的,它会在内存中存放大型对象列表。
A code profiler helps identify and optimize code hot spots, and really helps in understanding object usage and potential memory leaks.
代码评测器帮助鉴别和优化代码,并且在理解对象使用和潜在内存泄露方面真的很有帮助。
This might be important in large applications that support many different types of functionality, since the memory for the object is only allocated if the class is actually used.
这在支持很多不同类型功能的大型应用程序中可能很重要,因为只有在实际使用该类时,才会分配对象的内存。
A transient variable enables the application to keep a copy in local memory, but rebuilds the object if using the backup copy.
临时变量允许应用程序在本地内存中保留副本,但可以在使用备份副本的情况下重新构建对象。
To provide that information, it is necessary to capture allocation stack traces for every object allocation, which is very expensive and is also not available in most formats of memory dumps.
要提供此信息,需要为每个对象分配捕获分配堆栈跟踪,此开销很大,并且在许多格式的内存转储中不可用。
If no class objects are found in the owner chain, then this denotes the root object in the memory dump from where the leak container can be reached.
如果在所有者链中未发现任何类对象,则此术语表示可找到泄漏容器的内存转储中的根对象。
This program demonstrates a basic memory leaking operation involving an unbounded growth in a cache object.
此程序演示的基本内存泄漏操作涉及缓存对象中的无限增长。
Memory is allocated automatically in the heap area for each instantiated object, and the garbage collector periodically reclaims memory occupied by objects that are no longer needed.
每个实例化的对象都自动在堆中分配内存,垃圾收集程序定期收回不再使用的对象所占据的内存。
This technique may end up only being applicable when using very large, in memory object collections.
这个技术目前只在使用大型的内存对象集合的情况下才可用。
These rules control both the relationships allowed between scopes and the allowed references from an object in a scope to objects in other memory areas.
这些规则控制了作用域之间的许可关系,以及作用域中的对象对其他内存区域中的对象的引用。
For a process to use a Shared memory object, the process has to map the object in its address space.
使用共享内存对象的进程必须在自己的地址空间中映射对象。
PHP 5 introduces improvements to the object model; also, the underlying memory management has been redesigned with multi-threading and performance in mind.
PHP5改进了对象模型,底层的内存管理也从多线程和性能的角度重新作了设计。
The trade off is that by storing less information in the object, we limit the total amount of memory that can be used by the JVM.
折中的处理方法是通过在对象内存储更少的信息,限制可以被JVM使用的存储。
It should be noted that the size of the in-memory business object (BO) can be much larger than the representation available on the wire.
应该注意,内存中业务对象(BO)的大小可能比线路上可用的表示要大得多。
The AXIOM terminology for this is caching: AXIOM allows you to get StAX events or serialize the XML with or without building the object model in memory.
用AXIOM的术语称为缓冲:无论是否在内存中建立了对象模型,AXIOM都允许获得StAX事件或者序列化XML。
In his article, Stephen shows how to reduce the memory overhead by caching the last Task object and reusing it.
在Stephen的文章中,他展示了如何通过缓存最近的Task对象及重用该对象来降低内存开销。
The fix is simple: client2 refreshes its view of the object graph in memory, using the refresh method on the extension object (which is returned by ext ).
改进方法很简单:client2使用extension对象上的refresh方法刷新它在内存中的对象图视图,extension对象由ext返回。
In Listing 4, you create the Shared memory object using the open_only and read_only attributes.
在清单4中,使用open_only和read_only属性创建共享内存对象。
The code at BE allocates the memory from the heap for the Singleton object and stores a pointer to that memory in eax.
be处的代码为Singleton对象从堆中分配内存,并将一个指向该块内存的指针存储到eax中。
One of the most important of these is the aligned attribute, which is used for object alignment in memory.
最重要的属性之一是aligned属性,它用于在内存中实现对象对齐。
Leak container: the object which is holding all the objects with a large number of instances in memory; for example, the HashSet object in the memory leak example in Listing 1.
泄漏容器:保留在内存中具有大量实例的所有对象的对象;例如,清单1的内存泄漏示例中的HashSet对象。
Leak container: the object which is holding all the objects with a large number of instances in memory; for example, the HashSet object in the memory leak example in Listing 1.
泄漏容器:保留在内存中具有大量实例的所有对象的对象;例如,清单1的内存泄漏示例中的HashSet对象。
应用推荐