I do not find any method to retrieve a list of java objects that exist, such that one might go through the list looking for an object of the desired type.
I also would expect that MATLAB reference counts Java objects and destroys them when there is no more reference to the object. Otherwise there would have to be explicit release methods for every Java object so that the user could remove the Java object in a way different than the normal matlab variables.
https://www.mathworks.com/help/matlab/matlab_oop/handle-class-destructors.html
