What's the difference between the DeadObjectException
and a NullPointerException
?
I think I may understand but I just wanted to make sure.
My Understanding
A DeadObjectException
happens when you are trying to make a reference to something (and the memory still exists) but there aren't any pointers holding its address, so there's no way to reach that memory. It's different from a NullPointerException
in the fact that the memory still is valid, there's just no way to reach it.
Do I have the right idea? Based on other questions on the site:
I think my assertion is correct, I just wanted to make sure.
NullPointerException is when a reference doesn't point to any object within the same Java virtual machine.
DeadObjectException is when a you call a remote object that no longer exists. This happens on 2 different JVM.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With