Test exception type when trying to use a released object