Ensure recyle is done only once in IndexedMemPool.h
Summary: localPush invoked in recycleIndex can end up looping more than once if it has to retry the update of head. When that happens, the onRecycle call will be made again which will call destructor on the object again if eagerRecycle is true. Fixed it by making sure only the 1st pass of the loop will call onRecycle. (Note: this ignores all push blocking failures!) Reviewed By: nbronson Differential Revision: D18752349 fbshipit-source-id: 27dcb5c7840f724bbd39f4dc0176e21095a22284
Showing
Please register or sign in to comment