Index: trunk/psLib/src/math/psRegion.c
===================================================================
--- trunk/psLib/src/math/psRegion.c	(revision 7870)
+++ trunk/psLib/src/math/psRegion.c	(revision 7901)
@@ -6,4 +6,9 @@
 #include "psRegion.h"
 
+static void regionFree(psRegion *region)
+{
+    // There are non dynamic allocated items
+}
+
 psRegion *psRegionAlloc(float x0,
                         float x1,
@@ -12,4 +17,5 @@
 {
     psRegion *region = psAlloc(sizeof(psRegion)); // New region, to be returned
+    psMemSetDeallocator(region, (psFreeFunc)regionFree);
     // No complex structures, so no special deallocator
     *region = psRegionSet(x0, x1, y0, y1);
@@ -101,2 +107,11 @@
 }
 
+bool psMemCheckRegion(psPtr ptr)
+{
+    if (!is_psType(ptr)) {
+        return false;
+    }
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)regionFree );
+}
+
+
Index: trunk/psLib/src/math/psRegion.h
===================================================================
--- trunk/psLib/src/math/psRegion.h	(revision 7870)
+++ trunk/psLib/src/math/psRegion.h	(revision 7901)
@@ -27,4 +27,14 @@
                         float y1        ///< the last row of the region + 1.
                        );
+
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psRegion structure, false otherwise.
+ */
+bool psMemCheckRegion(
+    psPtr ptr                          ///< the pointer whose type to check
+);
 
 /** Create a psRegion with the specified attributes.
@@ -70,7 +80,11 @@
 );
 
-// Test if any element of the region is NaN
-bool psRegionIsNaN(psRegion region// Region to check
-                  );
+/** Test if any element of the region is NaN
+ *
+ * @return bool:        True if an element is NaN, otherwise false.
+ */
+bool psRegionIsNaN(
+    psRegion region                    ///< Region to check
+);
 
 #endif
