Review this C++ reference-counted handle. release() is called from multiple threads when handles go out of scope.
release()