 		}
 	}
 	printf("done (%g seconds)\n", stop_timer());
-	delete []counts.data;
-	delete []indices.data;
-	delete []dists.data;
+	delete []counts.ptr();
+	delete []indices.ptr();
+	delete []dists.ptr();
 }
 
 TEST_F(Flann_3D, TestRadiusSearch)


    void TearDown()
    {
        delete[] data.data;
        delete[] query.data;
        delete[] match.data;
        delete[] dists.data;
        delete[] indices.data;
    }
};



    void TearDown()
    {
        delete[] data.ptr();
        delete[] query.ptr();
        delete[] dists.ptr();
		delete[] gt_dists.ptr();
        delete[] indices.ptr();
		delete[] gt_indices.ptr();
		
    }
};
