Codes can only require a small number of ignition cycles, where tests are run and passed, to shut off the light. Though they can require many more cycles to remove the code from the history log. That is where the confussion is taking place.
Guessing your code may have been a P0455, which would set with a loose gas cap. Here is the specific clearing information for P0455.
Quote:
Conditions for Clearing the MIL/DTC
• The control module turns OFF the malfunction indicator lamp (MIL) after 3 consecutive ignition cycles that the diagnostic runs and does not fail.
• A current DTC, Last Test Failed, clears when the diagnostic runs and passes.
• A history DTC clears after 40 consecutive warm-up cycles, if no failures are reported by this or any other emission related diagnostic.
• Clear the MIL and the DTC with a scan tool.
So the light will shut off on its own or by use of the dealership's scan tool.
A problem with it shutting off on it's own, is that you put gas in the car.
Some evap tests will not take place with a full or near full gas tank, so that would extend the time required to turn of the light.
Here are the test requirements:
Quote:
Conditions for Running the DTC
• DTCs P0106, P0107, P0108, P0112, P0113, P0117, P0118, P0122, P0123, P0125, P0452, P0453, P0502, P0601, P0602, P0606, P0641 are not set.
• The engine is running.
• The ignition voltage is between 11-18 volts.
• The barometric pressure (BARO) is more than 74 kPa.
• The fuel level is between 15-85 percent.
• The start-up engine coolant temperature (ECT) is between 4-30°C (39-86°F).
• The start-up intake air temperature (IAT) is between 4-30°C (39-86°F).
• The start-up ECT and IAT are within 8°C (14.4°F) of each other.
• DTC P0455 runs once per cold start within 10 minutes of start-up
It sets because:
Conditions for Setting the DTC
The EVAP system is not able to achieve or maintain vacuum for up to 4 times during the diagnostic test