File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
google/cloud/bigtable/internal Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,10 @@ std::shared_ptr<QueryPlan> QueryPlan::Create(
3535 return plan;
3636}
3737
38+ QueryPlan::~QueryPlan () {
39+ if (refresh_timer_.valid ()) refresh_timer_.cancel ();
40+ }
41+
3842void QueryPlan::Initialize () {
3943 std::unique_lock<std::mutex> lock (mu_);
4044 if (state_ == RefreshState::kDone ) ScheduleRefresh (lock);
Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ class QueryPlan : public std::enable_shared_from_this<QueryPlan> {
4343 StatusOr<google::bigtable::v2::PrepareQueryResponse> response,
4444 RefreshFn fn, std::shared_ptr<Clock> clock = std::make_shared<Clock>());
4545
46+ ~QueryPlan ();
47+
4648 // Invalidates the current QueryPlan and triggers a refresh.
4749 void Invalidate (Status status, std::string const & invalid_query_plan_id);
4850
You can’t perform that action at this time.
0 commit comments