Is there a way to invoke a method when references to an object have gone 
out of scope?