mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 05:29:54 +08:00
releasing native memory of temp Mat
objects in generated Java code
This commit is contained in:
parent
6006790c18
commit
c1c03e16f4
@ -1240,6 +1240,7 @@ class JavaWrapperGenerator(object):
|
||||
if "O" in a.out:
|
||||
if not type_dict[a.ctype]["j_type"].startswith("MatOf"):
|
||||
j_epilogue.append("Converters.Mat_to_%(t)s(%(n)s_mat, %(n)s);" % {"t" : a.ctype, "n" : a.name})
|
||||
j_epilogue.append( "%s_mat.release();" % a.name )
|
||||
c_epilogue.append( "%(t)s_to_Mat( %(n)s, %(n)s_mat );" % {"n" : a.name, "t" : a.ctype} )
|
||||
else:
|
||||
fields = type_dict[a.ctype].get("jn_args", ((a.ctype, ""),))
|
||||
|
Loading…
Reference in New Issue
Block a user