Skip to content

Conversation

@shangxinli
Copy link
Contributor

@shangxinli shangxinli commented Dec 31, 2025

Replace raw new with std::make_shared for better exception safety and modern C++ best practices in RestCatalog::Make().

Replace raw new with std::make_shared for better exception safety
and modern C++ best practices in RestCatalog::Make().

Using std::make_shared provides:
- Better exception safety (no leak if constructor throws)
- More efficient memory allocation (single allocation for control block and object)
- More concise and readable code
- Consistent with modern C++ guidelines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant