VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
refCountedObject.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2025-2026 Arnis Lektauers
3//
4// Created by Arnis Lektauers 04.01.2026
5//
6#pragma once
7
8namespace visutwin::canvas
9{
11 {
12 public:
13 void incRefCount() { _refCount++; }
14 void decRefCount() { _refCount--; }
15 [[nodiscard]] int refCount() const { return _refCount; }
16
17 private:
18 int _refCount = 0;
19 };
20}