summaryrefslogtreecommitdiff
path: root/Runtime/Lua/LuaBind/LuaBindWatchDog.h
blob: 794faa94ac450a4d65333068a86df531d8211cac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef __LUA_BIND_DOG_H__
#define __LUA_BIND_DOG_H__

#include "LuaBindConfig.h"

namespace LuaBind
{

	//
	// NativeClassʵ�������ü�����watch dog��ֻ����watch dogͨ��ʱ�ſ���delete��
	//
	class WatchDog
	{
	public: 
		WatchDog()
			: mVMRef(0)
			, mNativeRef(0)
		{
		}

		inline operator bool()
		{
			return mVMRef == 0 && mNativeRef == 0;
		}

		uint mVMRef;     // �йܸ����������
		uint mNativeRef; // ����������

	};

}

#endif