blob: 37c9b562b1ae513c48e51585136d4d65310f7e41 [file] [log] [blame] [edit]
// Copyright 2017 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/lib/fxl/logging.h"
#include "src/ui/lib/escher/base/ownable.h"
namespace escher {
Reffable::~Reffable() { FX_DCHECK(ref_count_ == 0); }
#ifndef NDEBUG
void Reffable::Adopt() {
FX_DCHECK(adoption_required_);
FX_DCHECK(ref_count_ == 1);
adoption_required_ = false;
}
#endif
} // namespace escher