------------------------------------------------------------------------------
| 3070 | |
| 3071 | //------------------------------------------------------------------------------ |
| 3072 | void vtkKdTree::FreeSearchStructure() |
| 3073 | { |
| 3074 | SCOPETIMER("FreeSearchStructure"); |
| 3075 | |
| 3076 | if (this->Top) |
| 3077 | { |
| 3078 | vtkKdTree::DeleteAllDescendants(this->Top); |
| 3079 | this->Top->Delete(); |
| 3080 | this->Top = nullptr; |
| 3081 | } |
| 3082 | |
| 3083 | delete[] this->RegionList; |
| 3084 | this->RegionList = nullptr; |
| 3085 | |
| 3086 | this->NumberOfRegions = 0; |
| 3087 | this->SetActualLevel(); |
| 3088 | |
| 3089 | this->DeleteCellLists(); |
| 3090 | |
| 3091 | delete[] this->CellRegionList; |
| 3092 | this->CellRegionList = nullptr; |
| 3093 | |
| 3094 | delete[] this->LocatorPoints; |
| 3095 | this->LocatorPoints = nullptr; |
| 3096 | |
| 3097 | delete[] this->LocatorIds; |
| 3098 | this->LocatorIds = nullptr; |
| 3099 | |
| 3100 | delete[] this->LocatorRegionLocation; |
| 3101 | this->LocatorRegionLocation = nullptr; |
| 3102 | } |
| 3103 | |
| 3104 | //------------------------------------------------------------------------------ |
| 3105 | // build PolyData representation of all spatial regions------------ |