Changeset 727
- Timestamp:
- May 18, 2004, 3:20:02 PM (22 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 4 edited
-
image/psImage.c (modified) (3 diffs)
-
image/psImage.h (modified) (2 diffs)
-
mathtypes/psImage.c (modified) (3 diffs)
-
mathtypes/psImage.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/image/psImage.c
r719 r727 7 7 * @author Ross Harman, MHPCC 8 8 * 9 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $10 * @date $Date: 2004-05-1 8 23:26:26$9 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2004-05-19 01:20:02 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 65 65 void psImageFree(psImage *image) 66 66 { 67 if (image == NULL) { 68 return; 69 } 70 67 71 psImageFreeChildren(image); 68 psImageFreePixels(image); 72 73 psFree(image->data.v[0]); 74 psFree(image->data.v); 75 image->data.v = NULL; 76 69 77 psFree(image); 70 78 } … … 166 174 167 175 return (out); 168 }169 170 void psImageFreePixels(psImage *restrict image)171 {172 if (image == NULL || image->data.v == NULL) {173 return;174 }175 176 psFree(image->data.v[0]);177 psFree(image->data.v);178 image->data.v = NULL;179 180 // xxx - is this proper?181 *(unsigned int*)&image->numRows = 0;182 *(unsigned int*)&image->numCols = 0;183 176 } 184 177 -
trunk/psLib/src/image/psImage.h
r719 r727 7 7 * @author Ross Harman, MHPCC 8 8 * 9 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $10 * @date $Date: 2004-05-1 8 23:26:26$9 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2004-05-19 01:20:02 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 107 107 ); 108 108 109 /** Deallocate the image buffer of a psImage.110 *111 * deallocates the image buffer while preserving the psImage struct and any children.112 *113 */114 void psImageFreePixels(115 psImage* restrict image ///< psImage to free pixel memory from116 );117 118 109 /** Frees all children of a psImage. 119 110 * -
trunk/psLib/src/mathtypes/psImage.c
r719 r727 7 7 * @author Ross Harman, MHPCC 8 8 * 9 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $10 * @date $Date: 2004-05-1 8 23:26:26$9 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2004-05-19 01:20:02 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 65 65 void psImageFree(psImage *image) 66 66 { 67 if (image == NULL) { 68 return; 69 } 70 67 71 psImageFreeChildren(image); 68 psImageFreePixels(image); 72 73 psFree(image->data.v[0]); 74 psFree(image->data.v); 75 image->data.v = NULL; 76 69 77 psFree(image); 70 78 } … … 166 174 167 175 return (out); 168 }169 170 void psImageFreePixels(psImage *restrict image)171 {172 if (image == NULL || image->data.v == NULL) {173 return;174 }175 176 psFree(image->data.v[0]);177 psFree(image->data.v);178 image->data.v = NULL;179 180 // xxx - is this proper?181 *(unsigned int*)&image->numRows = 0;182 *(unsigned int*)&image->numCols = 0;183 176 } 184 177 -
trunk/psLib/src/mathtypes/psImage.h
r719 r727 7 7 * @author Ross Harman, MHPCC 8 8 * 9 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $10 * @date $Date: 2004-05-1 8 23:26:26$9 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2004-05-19 01:20:02 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 107 107 ); 108 108 109 /** Deallocate the image buffer of a psImage.110 *111 * deallocates the image buffer while preserving the psImage struct and any children.112 *113 */114 void psImageFreePixels(115 psImage* restrict image ///< psImage to free pixel memory from116 );117 118 109 /** Frees all children of a psImage. 119 110 *
Note:
See TracChangeset
for help on using the changeset viewer.
