Plasma Engine
2.0
Loading...
Searching...
No Matches
ScopedCFRef.h
1
#pragma once
2
3
#include <Foundation/FoundationInternal.h>
4
PL_FOUNDATION_INTERNAL_HEADER
5
6
#include <CoreFoundation/CoreFoundation.h>
7
9
template
<
typename
T>
10
class
plScopedCFRef
11
{
12
public
:
13
plScopedCFRef
(T Ref)
14
: m_Ref(Ref)
15
{
16
}
17
18
~plScopedCFRef
()
19
{
20
CFRelease(m_Ref);
21
}
22
23
operator
T()
const
24
{
25
return
m_Ref;
26
}
27
28
private
:
29
T m_Ref;
30
};
plScopedCFRef
Helper class to release references of core foundation objects correctly.
Definition
ScopedCFRef.h:11
Code
Engine
Foundation
Basics
Platform
OSX
ScopedCFRef.h
Generated by
1.11.0