How to properly dispose of movies with the new built-in library
in
Core Library Questions
•
4 months ago
I want to be able to open and close various movie files during the duration of a Processing sketch.
Opening is fairly straightforward, getting rid of it seems to be a bit tricky: just removing all references to it gives me a warning. Haven't run out of memory during tests yet, but the program is meant to run for a long time so this does matter. I found out that there is a "dispose()" method (discovered by trying out if the old GSVideo API was still appropriate), but I'm not sure how to use it.
At the moment I'm calling stop() followed by dispose() followed by removing all references to the Movie object. I still get warnings that the resources aren't properly freed sometimes, althought "it could be a refcounting bug"? It's not entirely clear.
Opening is fairly straightforward, getting rid of it seems to be a bit tricky: just removing all references to it gives me a warning. Haven't run out of memory during tests yet, but the program is meant to run for a long time so this does matter. I found out that there is a "dispose()" method (discovered by trying out if the old GSVideo API was still appropriate), but I'm not sure how to use it.
At the moment I'm calling stop() followed by dispose() followed by removing all references to the Movie object. I still get warnings that the resources aren't properly freed sometimes, althought "it could be a refcounting bug"? It's not entirely clear.
1