You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
Add some top level comments about CacheComponent & CacheItem. Add notes for the following important details:
- Most APIs take string views of keys, the user needs to ensure the string view is constant until the API is finished
- Components must call the item destructor in `release()`
- Children of CacheItem must call the item destructor in `move()` (only needed if the inline buffer is used)
The latter two clarifies responsibility for who calls the cache item destructor.
Also remove setting handle.item_ to nullptr in the destructor, it's unnecessary because it only compensates for buggy implementations that double-free.
Reviewed By: AlnisM
Differential Revision: D102372138
fbshipit-source-id: 342fa1b347c24e2ec9f59b25f7144253c2732f0f
0 commit comments