Good friends, I have a question for you. Does anyone know how to close a JFrame and in doing so release the memory that was used in that window? Pass the following, I have an application in which I log in and open a JFrame that acts as the main menu. One of the items in this menu is another JFrame, in which a report of all the economic activities of the clients is presented. I have it in a JTable and not in an IReport because once requested that data, they are loaded in a JTable and said data are manipulated (ordering, search of the major, search of the minor, grouping according to the desired at a certain time, etc.) . For each record of that JTable I can access the transaction detail, for which another JFrame opens with that data. This is the problem Every time I open the auxiliary windows the use of memory grows, and when I close it, it no longer goes down, it stays in that maximum, limiting the use of memory.
I would be grateful if anyone knows another way to close the window and release resources, because if I close in this way JFrame.EXIT_ON_CLOSE
, I close the entire application. I'm currently closing it with JFrame.DISPOSE_ON_CLOSE