/*1This file is part of t8code.2t8code is a C library to manage a collection (a forest) of multiple3connected adaptive space-trees of general element classes in parallel.45Copyright (C) 2015 the developers67t8code is free software; you can redistribute it and/or modify8it under the terms of the GNU General Public License as published by9the Free Software Foundation; either version 2 of the License, or10(at your option) any later version.1112t8code is distributed in the hope that it will be useful,13but WITHOUT ANY WARRANTY; without even the implied warranty of14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15GNU General Public License for more details.1617You should have received a copy of the GNU General Public License18along with t8code; if not, write to the Free Software Foundation, Inc.,1951 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.20*/2122/** \file t8_refcount.c23* Implements reference counting functions declared in \ref t8_refcount.h.24*/2526#include <t8_refcount.h>2728void29t8_refcount_init (t8_refcount_t *rc)30{31sc_refcount_init (rc, t8_get_package_id ());32}3334t8_refcount_t *35t8_refcount_new (void)36{37t8_refcount_t *rc;3839rc = T8_ALLOC (t8_refcount_t, 1);40t8_refcount_init (rc);4142return rc;43}4445void46t8_refcount_destroy (t8_refcount_t *rc)47{48T8_ASSERT (!sc_refcount_is_active (rc));49T8_FREE (rc);50}515253