void CBDestroyNetworkAddressList(void * vself){ CBNetworkAddressList * self = vself; for (uint32_t x = 0; x < self->addrNum; x++) CBReleaseObject(self->addresses[x]); if (self->addresses) free(self->addresses); CBDestroyMessage(vself); }
void CBDestroyBlockHeaders(void * vself){ CBBlockHeaders * self = vself; for (uint16_t x = 0; x < self->headerNum; x++) { CBReleaseObject(self->blockHeaders[x]); } CBDestroyMessage(self); }
void CBDestroyChainDescriptor(void * vself){ CBChainDescriptor * self = vself; for (uint16_t x = 0; x < self->hashNum; x++) { CBReleaseObject(self->hashes[x]); } free(self->hashes); CBDestroyMessage(self); }
void CBDestroyInventory(void * vself) { CBInventory * self = vself; for (CBInventoryItem * item = self->itemFront; item != NULL;) { CBInventoryItem * next = item->next; CBReleaseObject(item); // Free item item = next; } CBDestroyMessage(self); }
void CBDestroyAlert(void * vself) { CBAlert * self = vself; for (int x = 0; x < self->userAgentNum; x++) CBReleaseObject(self->userAgents[x]); free(self->setCancel); free(self->userAgents); if (self->hiddenComment) CBReleaseObject(self->hiddenComment); if (self->displayedComment) CBReleaseObject(self->displayedComment); if (self->reserved) CBReleaseObject(self->reserved); if (self->signature) CBReleaseObject(self->signature); if (self->payload) CBReleaseObject(self->payload); CBDestroyMessage(self); }
void CBDestroyNetworkAddress(void * vself){ CBNetworkAddress * self = vself; if (self->ip) CBReleaseObject(self->ip); CBDestroyMessage(self); }
void CBDestroyTransactionInput(void * vself){ CBTransactionInput * self = vself; if (self->scriptObject) CBReleaseObject(self->scriptObject); if (self->prevOut.hash) CBReleaseObject(self->prevOut.hash); CBDestroyMessage(self); }
void CBDestroyPingPong(void * self) { CBDestroyMessage(self); }