Machine for treating objects, in particular washing, thermal disinfection and/or sterilization of objects, comprising at least a treatment chamber (11) configured to house a plurality of object-holder containers (12, 13) located in sequence and comprising opposite lateral walls (30, 31); the machine comprises at least a releasable connection device (22, 22') of the object-holder containers (12, 13), associated with at least one of the object-holder containers (12, 13) and configured to cooperate with activation means (32, 33) positioned on the lateral walls inside the treatment chamber (11); the device (22, 22') comprises at least a sliding block (23, 23') associated with at least a first head and/or tail bar (15, 16) of a object-holder container (13, 12) and provided with an attachment element (24, 24') able to engage said first bar (15, 16) and at least a second bar (16, 15) of another object-holder container (12, 13), following the translation of the sliding block (23, 23') with respect to the first bar (15, 16); the sliding block (23, 23') is made to translate in one direction or the other with respect to the bar (15, 16) by means of the activation means (32, 33); so that, inserting an object-holder container (13) in the treatment chamber (11) after at least a first object-holder container (12) already inserted in the chamber (11) and moving the object-holder containers (12, 13) toward the inside of the chamber (11), the releasable connection device (22, 22') is automatically activated by the activation means (32, 33) in order to reciprocally connect the object-holder containers (12, 13), so as to allow a simultaneous extraction, acting on the last object-holder container (13) inserted.