This commit is contained in:
blueloveTH 2023-11-28 23:48:42 +08:00
parent e00ddb8692
commit b8b42a8414

View File

@ -74,12 +74,7 @@ struct Bytes{
Bytes& operator=(const Bytes& rhs) = delete; Bytes& operator=(const Bytes& rhs) = delete;
std::pair<unsigned char*, int> detach() noexcept; std::pair<unsigned char*, int> detach() noexcept;
~Bytes(){ ~Bytes(){ delete[] _data;}
if(_data != nullptr){
free(_data);
_data = nullptr;
}
}
}; };
using Super = std::pair<PyObject*, Type>; using Super = std::pair<PyObject*, Type>;