Index: trunk/psLib/src/image/psImage.c
===================================================================
--- trunk/psLib/src/image/psImage.c	(revision 996)
+++ trunk/psLib/src/image/psImage.c	(revision 1073)
@@ -9,6 +9,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-06-11 02:02:53 $
+ *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-06-23 23:00:15 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -28,4 +28,5 @@
 #include "psImage.h"
 
+static void imageFree(psImage* image);
 
 /*****************************************************************************/
@@ -49,4 +50,5 @@
 
     psImage *image = (psImage *)psAlloc(sizeof(psImage));
+    p_psMemSetDeallocator(image,(psFreeFcn)imageFree);
 
     image->data.V = psAlloc(sizeof(void*)*numRows);
@@ -71,5 +73,5 @@
 }
 
-void psImageFree(psImage *image)
+static void imageFree(psImage* image)
 {
     if (image == NULL) {
@@ -96,6 +98,4 @@
     psFree(image->data.V);
     image->data.V = NULL;
-
-    psFree(image);
 }
 
@@ -237,5 +237,5 @@
         if (children[i] != NULL) {
             numFreed++;
-            psImageFree(children[i]);
+            psFree(children[i]);
         }
     }
@@ -341,5 +341,5 @@
     case PS_TYPE_PTR: \
         psError(__func__,"Can't copy image from a matrix of pointers."); \
-        psImageFree(output); \
+        psFree(output); \
         return NULL; \
     default: \
@@ -391,5 +391,5 @@
     case PS_TYPE_PTR:
         psError(__func__,"Can't copy image into a matrix of pointers.");
-        psImageFree(output);
+        psFree(output);
         return NULL;
     }
@@ -534,5 +534,5 @@
         case PS_TYPE_PTR:
             psError (__func__, "Can't copy image from a matrix of pointers.");
-            psImageFree (output);
+            psFree (output);
             return ((void *) 0);
         default:
@@ -676,5 +676,5 @@
         case PS_TYPE_PTR:
             psError (__func__, "Can't copy image from a matrix of pointers.");
-            psImageFree (output);
+            psFree (output);
             return ((void *) 0);
         default:
@@ -818,5 +818,5 @@
         case PS_TYPE_PTR:
             psError (__func__, "Can't copy image from a matrix of pointers.");
-            psImageFree (output);
+            psFree (output);
             return ((void *) 0);
         default:
@@ -960,5 +960,5 @@
         case PS_TYPE_PTR:
             psError (__func__, "Can't copy image from a matrix of pointers.");
-            psImageFree (output);
+            psFree (output);
             return ((void *) 0);
         default:
@@ -1102,5 +1102,5 @@
         case PS_TYPE_PTR:
             psError (__func__, "Can't copy image from a matrix of pointers.");
-            psImageFree (output);
+            psFree (output);
             return ((void *) 0);
         default:
@@ -1244,5 +1244,5 @@
         case PS_TYPE_PTR:
             psError (__func__, "Can't copy image from a matrix of pointers.");
-            psImageFree (output);
+            psFree (output);
             return ((void *) 0);
         default:
@@ -1386,5 +1386,5 @@
         case PS_TYPE_PTR:
             psError (__func__, "Can't copy image from a matrix of pointers.");
-            psImageFree (output);
+            psFree (output);
             return ((void *) 0);
         default:
@@ -1528,5 +1528,5 @@
         case PS_TYPE_PTR:
             psError (__func__, "Can't copy image from a matrix of pointers.");
-            psImageFree (output);
+            psFree (output);
             return ((void *) 0);
         default:
@@ -1670,5 +1670,5 @@
         case PS_TYPE_PTR:
             psError (__func__, "Can't copy image from a matrix of pointers.");
-            psImageFree (output);
+            psFree (output);
             return ((void *) 0);
         default:
@@ -1812,5 +1812,5 @@
         case PS_TYPE_PTR:
             psError (__func__, "Can't copy image from a matrix of pointers.");
-            psImageFree (output);
+            psFree (output);
             return ((void *) 0);
         default:
@@ -1954,5 +1954,5 @@
         case PS_TYPE_PTR:
             psError (__func__, "Can't copy image from a matrix of pointers.");
-            psImageFree (output);
+            psFree (output);
             return ((void *) 0);
         default:
@@ -2096,5 +2096,5 @@
         case PS_TYPE_PTR:
             psError (__func__, "Can't copy image from a matrix of pointers.");
-            psImageFree (output);
+            psFree (output);
             return ((void *) 0);
         default:
@@ -2104,5 +2104,5 @@
     case PS_TYPE_PTR:
         psError (__func__, "Can't copy image into a matrix of pointers.");
-        psImageFree (output);
+        psFree (output);
         return ((void *) 0);
     }
