Implementing unique/shared_ptr for custom allocators (like Arena) in folly
Summary: - moving simple allocator *_ptr and convenience functions to folly - getting rid of arena_new - it encourages manually constructing smart pointers when folly::allocate_* should be used instead - using std::allocate_shared to construct shared_ptrs, thus properly using the allocator for the ref-counter too - fixing forwarding of parameters in the convenience functions - uniform allocation of smart pointers using both stl and non stl-like allocators Test Plan: - build + tests of existing client code - basic unit tests for arena smart pointers Reviewed By: delong.j@fb.com FB internal diff: D672818
Showing
Please register or sign in to comment