From: Andrii Grynenko Date: Tue, 13 Sep 2016 00:53:52 +0000 (-0700) Subject: Fix a bug in ObserverManager destructor X-Git-Tag: v2016.09.19.00~19 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=74b5413059e7be72dbc52ba815160bd6fe825835;p=folly.git Fix a bug in ObserverManager destructor Summary: facepaw Reviewed By: ckwalsh Differential Revision: D3853363 fbshipit-source-id: f863a3e3ae830256f5cff6c56f23254ff6fdee2a --- diff --git a/folly/experimental/observer/detail/ObserverManager.cpp b/folly/experimental/observer/detail/ObserverManager.cpp index e29522ab..9f8b7b7f 100644 --- a/folly/experimental/observer/detail/ObserverManager.cpp +++ b/folly/experimental/observer/detail/ObserverManager.cpp @@ -147,8 +147,8 @@ ObserverManager::ObserverManager() { ObserverManager::~ObserverManager() { // Destroy NextQueue, before the rest of this object, since it expects // ObserverManager to be alive. - nextQueue_.release(); - currentQueue_.release(); + nextQueue_.reset(); + currentQueue_.reset(); } void ObserverManager::scheduleCurrent(Function task) {