| 1564 | } |
| 1565 | |
| 1566 | void fxDeleteMachine(txMachine* the) |
| 1567 | { |
| 1568 | txSlot* aSlot; |
| 1569 | #ifndef mxLink |
| 1570 | txSlot* bSlot; |
| 1571 | txSlot* cSlot; |
| 1572 | #endif |
| 1573 | |
| 1574 | if (!(the->shared)) { |
| 1575 | #ifdef mxFrequency |
| 1576 | fxReportFrequency(the); |
| 1577 | #endif |
| 1578 | #ifdef mxDebug |
| 1579 | fxLogout(the); |
| 1580 | #endif |
| 1581 | } |
| 1582 | the->context = C_NULL; |
| 1583 | aSlot = the->cRoot; |
| 1584 | while (aSlot) { |
| 1585 | aSlot->flag |= XS_MARK_FLAG; |
| 1586 | aSlot = aSlot->next; |
| 1587 | } |
| 1588 | #ifndef mxLink |
| 1589 | aSlot = the->firstHeap; |
| 1590 | while (aSlot) { |
| 1591 | bSlot = aSlot + 1; |
| 1592 | cSlot = aSlot->value.reference; |
| 1593 | while (bSlot < cSlot) { |
| 1594 | if ((bSlot->kind == XS_HOST_KIND) && (bSlot->value.host.variant.destructor)) { |
| 1595 | if (bSlot->flag & XS_HOST_HOOKS_FLAG) { |
| 1596 | if (bSlot->value.host.variant.hooks->destructor) |
| 1597 | (*(bSlot->value.host.variant.hooks->destructor))(bSlot->value.host.data); |
| 1598 | } |
| 1599 | else |
| 1600 | (*(bSlot->value.host.variant.destructor))(bSlot->value.host.data); |
| 1601 | } |
| 1602 | bSlot++; |
| 1603 | } |
| 1604 | aSlot = aSlot->next; |
| 1605 | } |
| 1606 | #endif |
| 1607 | fxDeleteMachinePlatform(the); |
| 1608 | if (gxDefaults.terminateSharedCluster) |
| 1609 | gxDefaults.terminateSharedCluster(the); |
| 1610 | fxFree(the); |
| 1611 | c_free(the); |
| 1612 | } |
| 1613 | |
| 1614 | #if mxAliasInstance |
| 1615 | txMachine* fxCloneMachine(txCreation* theCreation, txMachine* theMachine, txString theName, void* theContext) |
nothing calls this directly
no test coverage detected