\brief destructor
| 155 | |
| 156 | /// \brief destructor |
| 157 | virtual ~bytes() { |
| 158 | if (is_owner_) { |
| 159 | owned_data_.reset(); |
| 160 | } |
| 161 | data_ = nullptr; |
| 162 | #ifdef __XRT__ |
| 163 | if (is_bo_owner_) { |
| 164 | owned_bo_.reset(); |
| 165 | } |
| 166 | bo_ = nullptr; |
| 167 | #endif |
| 168 | } |
| 169 | |
| 170 | /// \brief copy assignment operator |
| 171 | /// \param other the other bytes |