Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/shared/AutoHandle.h

Issue 10774005: Avoid duplication between AdblockPlus and AdblockPlusEngine (Closed)
Patch Set: Created May 24, 2013, 3:48 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/shared/AutoHandle.h
===================================================================
new file mode 100644
--- /dev/null
+++ b/src/shared/AutoHandle.h
@@ -0,0 +1,21 @@
+#ifndef AUTO_HANDLE_H
+#define AUTO_HANDLE_H
+
+#include <Windows.h>
+
+class AutoHandle
+{
+public:
+ AutoHandle();
+ explicit AutoHandle(HANDLE handle);
+ ~AutoHandle();
+ HANDLE get();
+
+private:
+ HANDLE handle;
+
+ AutoHandle(const AutoHandle& autoHandle);
+ AutoHandle& operator=(const AutoHandle& autoHandle);
+};
+
+#endif

Powered by Google App Engine
This is Rietveld