| 177 | } |
| 178 | |
| 179 | void MemoryLeakOutputStringBuffer::stopMemoryLeakReporting() |
| 180 | { |
| 181 | if (total_leaks_ == 0) { |
| 182 | addNoMemoryLeaksMessage(); |
| 183 | return; |
| 184 | } |
| 185 | |
| 186 | bool buffer_reached_its_capacity = outputBuffer_.reachedItsCapacity(); |
| 187 | outputBuffer_.resetWriteLimit(); |
| 188 | |
| 189 | if (buffer_reached_its_capacity) |
| 190 | addErrorMessageForTooMuchLeaks(); |
| 191 | |
| 192 | addMemoryLeakFooter(total_leaks_); |
| 193 | |
| 194 | if (giveWarningOnUsingMalloc_) |
| 195 | addWarningForUsingMalloc(); |
| 196 | |
| 197 | } |
| 198 | |
| 199 | void MemoryLeakOutputStringBuffer::addMemoryLeakHeader() |
| 200 | { |
no test coverage detected