KognitionAI / pilecv4j

Image and Video Manipulation and Processing
Apache License 2.0
6 stars 7 forks source link

Removing finalize from CvMat #18

Open mgrinshpon opened 1 year ago

mgrinshpon commented 1 year ago

JEP-421 slates finalize to be removed and this ticket tracks those removals from the JDK in full. JEP-421 recommends using try-with-resources and/or cleaners and phantomrefs to deal with memory problems. This is an issue to figure out solutions to that upcoming problem.

try-with-resource: we already do that- CvMat adds try-with-resources to OpenCV's mat. Finalize is used as a development aid to track resource leaks. This is a thread to talk about what to do.

I have done almost no work on coming up with a solution but some avenues of approach could be to: