A locking device , adapted for a first object and a second object , wherein the first object and the second object are movable with respect to each other, the locking device comprising: a first element movable between a locking state (Y2) and an unlocking state (Y1); and a second element ; wherein the second element is configured to drive the first element and thereby move the first element from the locking state (Y2) to the unlocking state (Y1) in response to the second object being displaced with respect to the first object from a retracted position (R) to a predetermined position (P) in an opening direction (D2), wherein the locking device further comprises a locking member that is configured to drive the second element to move the first element from the locking state (Y2) to the unlocking state (Y1), while the second object is being displaced with respect to the first object from the retracted position (R) to the predetermined position (P) in the opening direction (D2), wherein the locking device further comprises a locking hook , wherein the locking hook has a second portion configured to work with a path (T) of the locking member , the locking state (Y2) is a state in which the path (T) of the locking member is blocked by a second section of the first element such that the second portion of the locking hook is obstructed in the path (T) by the second section of the first element , and the unlocking state (Y1) is a state in which the path (T) of the locking member is not blocked by the second section of the first element such that the second portion of the locking hook is not obstructed in the path (T), the second object therefore being allowed to be displaced with respect to the first object to an extended position (E) in the opening direction (D2), thereby causing the second portion of the locking hook to exit the path (T). a first element movable between a locking state (Y2) and an unlocking state (Y1); and a second element ; wherein the second element is configured to drive the first element and thereby move the first element from the locking state (Y2) to the unlocking state (Y1) in response to the second object being displaced with respect to the first object from a retracted position (R) to a predetermined position (P) in an opening direction (D2), wherein the locking device further comprises a locking member that is configured to drive the second element to move the first element from the locking state (Y2) to the unlocking state (Y1), while the second object is being displaced with respect to the first object from the retracted position (R) to the predetermined position (P) in the opening direction (D2), wherein the locking device further comprises a locking hook , wherein the locking hook has a second portion configured to work with a path (T) of the locking member , the locking state (Y2) is a state in which the path (T) of the locking member is blocked by a second section of the first element such that the second portion of the locking hook is obstructed in the path (T) by the second section of the first element , and the unlocking state (Y1) is a state in which the path (T) of the locking member is not blocked by the second section of the first element such that the second portion of the locking hook is not obstructed in the path (T), the second object therefore being allowed to be displaced with respect to the first object to an extended position (E) in the opening direction (D2), thereby causing the second portion of the locking hook to exit the path (T). <EOS>