wavelength 1.0.0
Loading...
Searching...
No Matches
attachment.h
Go to the documentation of this file.
1#pragma once
2
17public:
23 Attachment() : mRefs(0) {
24 }
25
32 virtual ~Attachment();
33
40 void AddRef();
41
48 void Release();
49
58 static void ReleaseIfSet(Attachment *pAttachment) {
59 if (pAttachment != nullptr) {
60 pAttachment->Release();
61 }
62 }
63
64private:
65 int mRefs;
66};
void Release()
Give back one reference and delete the object once the last one is gone.
virtual ~Attachment()
Release the object.
void AddRef()
Take one reference.
static void ReleaseIfSet(Attachment *pAttachment)
Give back one reference to an object that may be null.
Definition attachment.h:58
Attachment()
Construct an object with no reference.
Definition attachment.h:23