Skip to content

refactor: use std::make_unique instead of raw new in ReaderProperties#474

Closed
shangxinli wants to merge 1 commit intoapache:mainfrom
shangxinli:bugfixes_new_5
Closed

refactor: use std::make_unique instead of raw new in ReaderProperties#474
shangxinli wants to merge 1 commit intoapache:mainfrom
shangxinli:bugfixes_new_5

Conversation

@shangxinli
Copy link
Contributor

Replace raw new with std::make_unique for better exception safety and modern C++ best practices in ReaderProperties::default_properties() and ReaderProperties::FromMap().

Using std::make_unique provides:

  • Better exception safety (no leak if constructor throws)
  • More concise and readable code
  • Consistent with modern C++ guidelines

Replace raw new with std::make_unique for better exception safety
and modern C++ best practices in ReaderProperties::default_properties()
and ReaderProperties::FromMap().

Using std::make_unique provides:
- Better exception safety (no leak if constructor throws)
- 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