1 | initial version |
mask = new Mat()
should go into some initalization routine (like onCameraViewStarted, done once only)mRgba.release();
that's the wrong one.//mask.release();
well, if you return it, you must no release it before.
again, the problem is the reocurring new
there. move all your temporary allocations to onCameraViewStarted(), and release all of them in onCameraViewStopped()
2 | No.2 Revision |
mask = new Mat()
should go into some initalization routine (like onCameraViewStarted, done once only)mRgba.release();
that's the wrong one.//mask.release();
well, if you return it, you must again, the problem is the reocurring new
there. move all your temporary allocations to onCameraViewStarted(), and release all of them in onCameraViewStopped()
3 | No.3 Revision |
mask = new Mat()
should go into some initalization routine (like onCameraViewStarted, done once only)copyTo()
and clone()
are indeed the samemRgba.release();
that's the wrong one.//mask.release();
well, if you return it, you must not release it before.
again, the problem is the reocurring new
there. move all your temporary allocations to onCameraViewStarted(), and release all of them in onCameraViewStopped()
4 | No.4 Revision |
mask = new Mat()
should go into some initalization routine (like onCameraViewStarted, done once only)copyTo()
and clone()
are indeed the samemRgba.release();
that's the wrong one.//mask.release();
well, if you return it, you must not release it before.
again, the problem is the reocurring new
there. move all your temporary allocations to onCameraViewStarted(), and release all of them in onCameraViewStopped()