Qihoo360 / zeppelin

A Scalable, High-Performance Distributed Key-Value Platform
Apache License 2.0
399 stars 81 forks source link

Improve exception safety with smart pointers #27

Open elfring opened 6 years ago

elfring commented 6 years ago

Would you like to wrap any pointer data members with the template class “std::unique_ptr”?

CatKang commented 6 years ago

Thanks elfring,

But we prefer to use raw pointer than any smart pointers, and believe following good code style we can control it with no extra overhead.

Only once we used shared_ptr for Partition since we need its sharing of ownership and reference counting.

elfring commented 6 years ago

Did you notice that the implementation of the class “ZPMetaServer” is unsafe so far because of mentioned preferences?