Code:
if (!OrderedOpenSet.empty()) {
   current.reset((NodePoolNode*)&(*OrderedOpenSet.begin()));
}
When the current pointer got reset (it is NULL in the first run and got overwritten in the next iteration), the weak count is 1 and the strong count is 2, due to the fact the weak count is 1 or 0 after this call, the pointer was released. How can I avoid it from happening?
I want this pointer to get released outside of this function?
Thanks
Jack