I\'ve an object with a certain state. The object is passed around and it\'s state is temporarly altered. Something like:
public void doSomething(MyObject obj) {
Short answer: No.
Medium answer: The best practice in this situation is to use a try ... finally
block.
Longer answer: C++ doesn't really give you this either: C++ destructors are run on de-allocation. If you fail to deallocate an object and all references to it fall out of scope, the destructor will not be called.
As an aside, if garbage collection in Java was reference counting, then finalizers would implement exactly this behaviour.