diff options
Diffstat (limited to 'XMPFiles/source/FileHandlers/UCF_Handler.hpp')
-rw-r--r-- | XMPFiles/source/FileHandlers/UCF_Handler.hpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/XMPFiles/source/FileHandlers/UCF_Handler.hpp b/XMPFiles/source/FileHandlers/UCF_Handler.hpp index f20a9b2..ab44f90 100644 --- a/XMPFiles/source/FileHandlers/UCF_Handler.hpp +++ b/XMPFiles/source/FileHandlers/UCF_Handler.hpp @@ -237,8 +237,8 @@ private: //TODO intergrate in clear() void release() // avoid terminus free() since subject to a #define (mem-leak-check) { - if (filename) delete filename; - if (extraField) delete extraField; + if (filename) delete [] filename; + if (extraField) delete [] extraField; filename=0; extraField=0; } @@ -277,10 +277,10 @@ private: PutUns16LE(0x14, &fields[FileHeader::o_extractVersion] ); } - FileHeader() : filename(0),filenameLen(0),extraField(0),extraFieldLen(0) + FileHeader() : filename(0),extraField(0),filenameLen(0),extraFieldLen(0) { clear(); - }; + } // reads entire *FileHeader* structure from file (starting at current position) void read(XMP_IO* file) @@ -379,9 +379,9 @@ private: private: void release() //*** needed or can go? { - if (filename) delete filename; - if (extraField) delete extraField; - if (comment) delete comment; + if (filename) delete [] filename; + if (extraField) delete [] extraField; + if (comment) delete [] comment; filename=0; filenameLen=0; extraField=0; extraFieldLen=0; comment=0; commentLen=0; @@ -470,7 +470,7 @@ private: } // Assignment operator - CDFileHeader& operator=(const CDFileHeader& obj) + CDFileHeader& operator=(const CDFileHeader& /*obj*/) { XMP_Throw("not supported",kXMPErr_Unimplemented); } @@ -547,7 +547,7 @@ private: { //// WRITE BACK REAL 64 BIT VALUES, CREATE EXTRA FIELD /////////////// //may only wipe extra field after obtaining all Info from it - if (extraField) delete extraField; + if (extraField) delete [] extraField; extraFieldLen=0; if ( ( sizeUncompressed > 0xffffffff ) || @@ -598,7 +598,7 @@ private: void setXMPFilename() { - if (filename) delete filename; + if (filename) delete [] filename; filenameLen = xmpFilenameLen; filename = new char[xmpFilenameLen]; PutUns16LE(filenameLen, &fields[CDFileHeader::o_fileNameLength] ); @@ -630,8 +630,9 @@ private: const static XMP_Uns32 SIG = 0x06054b50; void UCFECD_Free() { - if(commentLen) delete comment; + if(commentLen) delete [] comment; commentLen = 0; + comment = 0; } public: const static XMP_Int32 o_Sig = 0; @@ -678,7 +679,7 @@ private: ~EndOfCD() { - if (comment) delete comment; + if (comment) delete [] comment; }; }; //class EndOfCD |