Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

the java gc does not see any native c++ memory allocation, so you can't rely on that.

if you do e.g. something like this:

Mat src = ...
Mat dst = new Mat()
Imgproc.cvtColor(src,dst, COLOR_BGR2RGB);

then you have to release anything you allocated using new manually:

dst.release();

the java gc does not see any native c++ memory allocation, so you can't rely on that.

if you do e.g. something like this:

Mat src = ...
Mat dst = new Mat()
Mat();
Imgproc.cvtColor(src,dst, COLOR_BGR2RGB);

then you have to release anything you allocated using new manually:

dst.release();