! * \brief gplotDestroy() * * \param[in,out] pgplot to be nulled */
| 194 | * \param[in,out] pgplot to be nulled |
| 195 | */ |
| 196 | void |
| 197 | gplotDestroy(GPLOT **pgplot) |
| 198 | { |
| 199 | GPLOT *gplot; |
| 200 | |
| 201 | PROCNAME("gplotDestroy"); |
| 202 | |
| 203 | if (pgplot == NULL) { |
| 204 | L_WARNING("ptr address is null!\n", procName); |
| 205 | return; |
| 206 | } |
| 207 | |
| 208 | if ((gplot = *pgplot) == NULL) |
| 209 | return; |
| 210 | |
| 211 | LEPT_FREE(gplot->rootname); |
| 212 | LEPT_FREE(gplot->cmdname); |
| 213 | sarrayDestroy(&gplot->cmddata); |
| 214 | sarrayDestroy(&gplot->datanames); |
| 215 | sarrayDestroy(&gplot->plotdata); |
| 216 | sarrayDestroy(&gplot->plottitles); |
| 217 | numaDestroy(&gplot->plotstyles); |
| 218 | LEPT_FREE(gplot->outname); |
| 219 | if (gplot->title) |
| 220 | LEPT_FREE(gplot->title); |
| 221 | if (gplot->xlabel) |
| 222 | LEPT_FREE(gplot->xlabel); |
| 223 | if (gplot->ylabel) |
| 224 | LEPT_FREE(gplot->ylabel); |
| 225 | |
| 226 | LEPT_FREE(gplot); |
| 227 | *pgplot = NULL; |
| 228 | return; |
| 229 | } |
| 230 | |
| 231 | |
| 232 | /*! |
no test coverage detected