weixin_39732534
2020-12-02 04:43Memory Allocation
I've seen that for the creation of the Entities when parsing the ifc file you use a function EntityFactory:createEntityObject that return a lambda with a new call. After, you assign a returned pointer to a std::shared_ptr. When tou do so, a double allocation is made, one for the entity by the new call, and one for a control block. Reading large ifc files this is time consuming. If you use std::make_shared, only one allocation is made.
Thanks
该提问来源于开源项目:ifcquery/ifcplusplus
- 点赞
- 回答
- 收藏
- 复制链接分享
8条回答
为你推荐
- Golang和大内存块分配
- benchmarking
- memory-management
- java
- 1个回答
- 在Go中调用EnumServicesStatusEx,内存分配?
- windows
- 1个回答
- Google App Engine Go内存管理
- memory-management
- memory
- 1个回答
- 流程与Golang中的Goroutine一样吗?
- memory
- process
- goroutine
- 2个回答
- 记忆策略
- memory-management
- readfile
- php
- 2个回答
换一换