How can I get the memory used by an instance of the class java.awt.Image
?
There are other similar questions, but is there an easier way of calculating the memory used by an object of a specific class (java.awt.Image
)?
I would prefer to get the amount of bytes used programatically and not via a profiler so that I can use it to calculate memory statistics inside my application.
Thanks in advance.