PineForge unreleased
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
adapter_exposure_storage.hpp
Go to the documentation of this file.
1#pragma once
2
3namespace pineforge::detail {
4
5// Exposure values/handles have already been erased by their existing owner.
6// Empty containers still retain buckets/capacity while a cohort's origin
7// history pins its resident row. Release that storage without retiring any
8// origin, changing a cohort record, or touching the hash's logical inputs.
9template<class Container>
10inline void release_empty_exposure_capacity(Container& container) {
11 if (container.empty()) {
12 Container empty;
13 container.swap(empty);
14 }
15}
16
17template<class Container>
18inline void clear_exposure_storage(Container& container) {
19 Container empty;
20 container.swap(empty);
21}
22
23} // namespace pineforge::detail
void clear_exposure_storage(Container &container)
void release_empty_exposure_capacity(Container &container)