Yes.
You can discharge the capacitor using a diode to connect the positive end of the capacitor to the +ve power supply rail. When you switch the power off, the LM339 supply will falls and when its voltage falls to below capacitor terminal voltage minus one diode drop, the diode will conduct and dump the charge of the capacitor to the LM339 circuit until the whole circuit reaches 0.6V.
This diode is reversed biased when the supply is healthy so plays no part in charging the capacitor and your RC time constant will remain the same.