Index: examples/gc_no_raii/src/tools/checks.h
===================================================================
--- examples/gc_no_raii/src/tools/checks.h	(revision 90152a4860529aff7214be01cd22abd37012cd19)
+++ examples/gc_no_raii/src/tools/checks.h	(revision 90152a4860529aff7214be01cd22abd37012cd19)
@@ -0,0 +1,29 @@
+#pragma once
+
+#ifdef NDEBUG
+
+#define check(x)
+
+#define checkf(x, format, ...)
+
+#warning no debug checks
+
+#else
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#define check(x) do {\
+	if(!(x)) {\
+		printf("CHECK failed : %s at %s:%i\n", #x, __FILE__, __LINE__);\
+		abort();\
+	}}while( (int)0 )\
+
+#define checkf(x, ...) do {\
+	if(!(x)) {\
+		printf("CHECK failed : %s at %s:%i\n", #x, __FILE__, __LINE__);\
+		printf(__VA_ARGS__);\
+		abort();\
+	}}while( (int)0 )\
+
+#endif //NO_CHECKS
