23 lines
No EOL
385 B
C++
23 lines
No EOL
385 B
C++
//
|
|
// Created by faraphel on 23/08/24.
|
|
//
|
|
|
|
#include "MixinAsReferenceCount.hpp"
|
|
|
|
|
|
namespace atlas::utils::angelscript {
|
|
|
|
MixinAsReferenceCount::MixinAsReferenceCount() {
|
|
this->referenceCount = 1;
|
|
}
|
|
|
|
void MixinAsReferenceCount::asAddReference() {
|
|
this->referenceCount++;
|
|
}
|
|
|
|
void MixinAsReferenceCount::asRelease() {
|
|
if (--this->referenceCount <= 0)
|
|
delete this;
|
|
}
|
|
|
|
} |