could you explain why detach on constructor?