fix JNI objects allocation and memory corruption
- we were allocating objects with a destructor in the command stream which is always invalid because there is no guarantee that when the callback is called, the underlaying memory is still valid (and it wasn't). - AutoBuffer move-ctor wasn't moving some of its state, which would lead to destroying the same ref several times.
This commit is contained in:
committed by
Mathias Agopian
parent
920dc6b167
commit
786dbdc6e4
@@ -112,6 +112,7 @@ AutoBuffer::AutoBuffer(AutoBuffer &&rhs) noexcept {
|
||||
std::swap(mShift, rhs.mShift);
|
||||
std::swap(mBuffer, rhs.mBuffer);
|
||||
std::swap(mBaseArray, rhs.mBaseArray);
|
||||
std::swap(mNioUtils, rhs.mNioUtils);
|
||||
}
|
||||
|
||||
AutoBuffer::~AutoBuffer() noexcept {
|
||||
|
||||
Reference in New Issue
Block a user