Initial implementation of detach() method.