Java – why is there no outofmemoryerror subclass?
•
Java
As we all know, outofmemoryerror has many reasons (see first answer) Why does only one exception cover all of these cases instead of multiple fine-grained exceptions inherited from outofmemoryerror?
Solution
I expect, because when this happens, you really can't do anything else: because you're screwed up anyway, it's almost irrelevant Maybe additional information would be good, but
I know that Tomcat tried to do the "out of memory parachute" thing. They grabbed a large piece of memory and tried to release it, but I'm not sure how it worked
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码