Open3DMotionGroup / Open3DMotion

Other
5 stars 2 forks source link

TreeBinary constructor and TreeBinary::SetData should take ownership of MemoryHandler to avoid unnecessary clone operations. #36

Closed drjrm closed 5 years ago

drjrm commented 5 years ago

In most circumstances where TreeBinary is constructed, the MemoryHandler which populates it is constructed especially for this purpose, and so it is unnecessary overhead for TreeBinary::TreeBinary or TreeBinary::SetData to perform a Clone operation on the MemoryHandler parameter they receive. They should just acquire the pointer and take responsibility for deletion.

drjrm commented 5 years ago

6f35086515a44aee344d37905591e754aabeffa3