Files
test2/source/blender/blenlib/intern/resource_scope.cc

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
407 B
C++
Raw Normal View History

/* SPDX-FileCopyrightText: 2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#include "BLI_resource_scope.hh"
namespace blender {
ResourceScope::ResourceScope() = default;
ResourceScope::~ResourceScope()
{
/* Free in reversed order. */
for (int64_t i = resources_.size(); i--;) {
ResourceData &data = resources_[i];
data.free(data.data);
}
}
} // namespace blender