When a DTC is stored in ECM
WARNING: This page is about a different car, the 2011 Infiniti G37. However, it is still accessible from the selected car via links, so may be relevant.
When a DTC is stored in ECM and MIL is ON, a permanent DTC is erased with MIL shutoff if the same malfunction is not detected after performing the driving pattern for MIL shutoff three times in a raw.
Courtesy of NISSAN MOTOR CO., U.S.A.