Landing: e32651c0434e

Project / Subsystem

gcc / gcc

Date

2026-05-18

Author

David Malcolm

Commit

e32651c0434e28e9277bd97f9400c1ea56131892

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc
patch_id
commit_hash
e32651c0434e28e9277bd97f9400c1ea56131892
source_type
github
headline
Modernize optrecord JSON writer with smart pointers.
tldr
The `optrecord_json_writer` class is updated to use modern C++ features like `std::unique_ptr` for memory management.
author
David Malcolm
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • optimization
  • json
  • modern C++
discussion_id_link
bugzilla_pr
date
2026-05-18T00:00:00.000Z

The optrecord_json_writer class has been modernized to use std::unique_ptr for memory management, replacing raw new and delete calls. This improves code safety and reduces the risk of memory leaks. The change also updates the code to use nullptr instead of NULL and passes non-null values by const-reference instead of const-pointer where appropriate.