boostorg / boostorg/json

Temp variable uses wrong storage

Open
#694 7 comments 0 reactions 1 assignee Claimed by @grisumbras View on GitHub
Dominant language
C++
Stars
479
Forks
110
Avg merge
10d 3h
Merged PRs (30d)
5

Description

I think instead of using the array's storage it should use the default storage:
https://github.com/boostorg/json/blob/83c364afaf31b58cfe8b97ab159c406c508f47c9/include/boost/json/impl/array.hpp#L527

Otherwise we are allocating and deallocating in the wrong order, and we are not making correct use of monotonic storage. We should review all functions which require temporary storage (e.g. `object::insert`).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.