Why is the `boost :: multi_array_ref` destructor not virtual?

The relationship between const_multi_array_ref, multi_array_refand is multi_arrayas follows:

  • multi_array_ref obtained from const_multi_array_ref
  • multi_array obtained from multi_arry_ref

But destructors const_multi_array_refand multi_array_refthey are not virtual. In fact, they do not have an explicitly implemented destructor. Only multi_arrayhas one. Does this mean that the next use is not recommended?

multi_array_ref<float, 2> * = new multi_array<float, 2>(extents[3][3]);

If so, why?

+5
source share
1 answer

multi_array . , . STL- , multi_array_ref .

- , multi_array delete.

multi_array multi_array_ref.

+2

All Articles