| 70 | } |
| 71 | |
| 72 | XmlFileStream::~XmlFileStream() |
| 73 | { |
| 74 | if (fileOpen == 1) { |
| 75 | this->close(); |
| 76 | } |
| 77 | |
| 78 | /* |
| 79 | if (theChannels != 0) { |
| 80 | static ID lastMsg(1); |
| 81 | if (sendSelfCount > 0) { |
| 82 | for (int i=0; i<sendSelfCount; i++) |
| 83 | theChannels[i]->sendID(0, 0, lastMsg); |
| 84 | } else |
| 85 | theChannels[0]->recvID(0, 0, lastMsg); |
| 86 | delete [] theChannels; |
| 87 | } |
| 88 | */ |
| 89 | |
| 90 | if (indentString != 0) |
| 91 | delete [] indentString; |
| 92 | |
| 93 | if (fileName != 0) |
| 94 | delete [] fileName; |
| 95 | |
| 96 | if (sendSelfCount > 0) { |
| 97 | |
| 98 | for (int i=0; i<=sendSelfCount; i++) { |
| 99 | if (theColumns != 0) |
| 100 | if (theColumns[i] != 0) |
| 101 | delete theColumns[i]; |
| 102 | |
| 103 | if (theData != 0) |
| 104 | if (theData[i] != 0) |
| 105 | delete [] theData[i]; |
| 106 | |
| 107 | if (theRemoteData != 0) |
| 108 | if (theRemoteData[i] != 0) |
| 109 | delete theRemoteData[i]; |
| 110 | } |
| 111 | if (theData != 0) delete [] theData; |
| 112 | if (theRemoteData != 0) delete [] theRemoteData; |
| 113 | if (theColumns != 0) delete [] theColumns; |
| 114 | if (sizeColumns != 0) delete sizeColumns; |
| 115 | } |
| 116 | |
| 117 | if (sendSelfCount < 0) { |
| 118 | |
| 119 | if (theColumns[0] != 0) |
| 120 | delete theColumns[0]; |
| 121 | |
| 122 | delete [] theColumns; |
| 123 | } |
| 124 | |
| 125 | if (xmlColumns != 0) |
| 126 | delete xmlColumns; |
| 127 | |
| 128 | if (tags != nullptr) { |
| 129 | for (int i=0; i<sizeTags; i++) |