* xmlCleanupCharEncodingHandlers: * * DEPRECATED: This function will be made private. Call xmlCleanupParser * to free global state but see the warnings there. xmlCleanupParser * should be only called once at program exit. In most cases, you don't * have call cleanup functions at all. * * Cleanup the memory allocated for the char encoding support, it * unregisters all the encoding handlers
| 1440 | * unregisters all the encoding handlers and the aliases. |
| 1441 | */ |
| 1442 | void |
| 1443 | xmlCleanupCharEncodingHandlers(void) { |
| 1444 | xmlCleanupEncodingAliases(); |
| 1445 | |
| 1446 | if (handlers == NULL) return; |
| 1447 | |
| 1448 | for (;nbCharEncodingHandler > 0;) { |
| 1449 | nbCharEncodingHandler--; |
| 1450 | if (handlers[nbCharEncodingHandler] != NULL) { |
| 1451 | if (handlers[nbCharEncodingHandler]->name != NULL) |
| 1452 | xmlFree(handlers[nbCharEncodingHandler]->name); |
| 1453 | xmlFree(handlers[nbCharEncodingHandler]); |
| 1454 | } |
| 1455 | } |
| 1456 | xmlFree(handlers); |
| 1457 | handlers = NULL; |
| 1458 | nbCharEncodingHandler = 0; |
| 1459 | } |
| 1460 | |
| 1461 | /** |
| 1462 | * xmlRegisterCharEncodingHandler: |
no test coverage detected