Skip to content

refactor: use std::make_unique instead of raw new in WriterProperties#471

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

refactor: use std::make_unique instead of raw new in WriterProperties#471
shangxinli wants to merge 1 commit intoapache:mainfrom
shangxinli:bugfixes_new_4

Conversation

@shangxinli
Copy link
Contributor

Replace raw new with std::make_unique for better exception safety and modern C++ best practices in WriterProperties::default_properties() and WriterProperties::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 WriterProperties::default_properties()
and WriterProperties::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