simcc
simcc copied to clipboard
about the misc/lru.h Key pointer problem
I read the lru.h code, I have an question want to ask:
lru-cache-cpp assumes the whole hash was allocated when finished construction, so will not cause rehash problem, and pointer to key and value will not invalid later. But you implementation replaced with std::unordered_map, and not acquired whole memory before, then your const K* key may invalid if rehash occurs.
And another question, what's the meaning of your ValueSize? the difference of sizeof_ and sizeof ??