返回题库

Quant Interview Practice Questions

专题
memory_optimization
难度
L2
来源
MyntBit

题目详情

In high-frequency trading systems, maintaining an efficient cache of market data snapshots is critical for performance and memory management. Utilizing weak pointers allows multiple components, such as pricing engines and risk monitors, to share snapshot instances without redundant allocations while ensuring automatic eviction when no active references remain. Task Implement a MarketDataCache class utilizing std::weak_ptr to manage shared Snapshot objects. The class must support the following m