We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6f1d8f8 + d1a3d52 commit 495f61fCopy full SHA for 495f61f
src/cpp/flann/algorithms/kdtree_index.h
@@ -299,15 +299,19 @@ class KDTreeIndex : public NNIndex<Distance>
299
* Point data
300
*/
301
ElementType* point;
302
- /**
303
- * The child nodes.
304
- */
305
- Node* child1, * child2;
306
-
307
- ~Node() {
308
- if (child1!=NULL) child1->~Node();
309
- if (child2!=NULL) child2->~Node();
310
- }
+ /**
+ * The child nodes.
+ */
+ Node* child1, *child2;
+ Node(){
+ child1 = NULL;
+ child2 = NULL;
+ }
+ ~Node() {
311
+ if (child1 != NULL) { child1->~Node(); child1 = NULL; }
312
+
313
+ if (child2 != NULL) { child2->~Node(); child2 = NULL; }
314
315
316
private:
317
template<typename Archive>
0 commit comments