在内部,相关数据通过指针被拷贝到动态分贝的内存上。
Internally the data referenced by the pointer is copied into dynamically allocated memory.
这有一部分是由于它在内部使用了文档模型,但是JBind使用的内存量要比单独使用文档模型(如dom 4 j)所需的内存量大好几倍。
This is partially due to its internal use of a document model, but the amount of memory used by JBind is several times larger than that needed by a document model (such as dom4j) alone.
使用池的另一个不太明显的优点在于,作为程序员,您不必担心内存泄露:内存由boost库在内部自动进行管理。
Another less obvious benefit of using pools is that as a programmer, you don't have to worry about memory leaks: they're automatically managed internally by the Boost library.
应用推荐