| 690 | } |
| 691 | |
| 692 | void LNLib::VoronoiDiagramGenerator::cleanup() |
| 693 | { |
| 694 | if (sites != 0) |
| 695 | { |
| 696 | free(sites); |
| 697 | sites = 0; |
| 698 | } |
| 699 | |
| 700 | FreeNodeArrayList* current = 0, * prev = 0; |
| 701 | |
| 702 | current = prev = allMemoryList; |
| 703 | |
| 704 | if (current != 0) |
| 705 | { |
| 706 | while (current->next != 0) |
| 707 | { |
| 708 | prev = current; |
| 709 | current = current->next; |
| 710 | free(prev->memory); |
| 711 | delete prev; |
| 712 | prev = 0; |
| 713 | } |
| 714 | } |
| 715 | allMemoryList = 0; |
| 716 | |
| 717 | if (current != 0 && current->memory != 0) |
| 718 | { |
| 719 | free(current->memory); |
| 720 | delete current; |
| 721 | } |
| 722 | |
| 723 | allMemoryList = new FreeNodeArrayList; |
| 724 | allMemoryList->next = 0; |
| 725 | allMemoryList->memory = 0; |
| 726 | currentMemoryBlock = allMemoryList; |
| 727 | |
| 728 | if (ELhash != 0) |
| 729 | { |
| 730 | free(ELhash); |
| 731 | ELhash = 0; |
| 732 | } |
| 733 | |
| 734 | if (PQhash != 0) |
| 735 | { |
| 736 | free(PQhash); |
| 737 | PQhash = 0; |
| 738 | } |
| 739 | } |
| 740 | |
| 741 | void LNLib::VoronoiDiagramGenerator::cleanupEdges() |
| 742 | { |
nothing calls this directly
no outgoing calls
no test coverage detected