Sounds like you are talking about the entirety of a small circuit?
If the circuit connects both sides of the capacitor, then it will discharge it. But that means the circuit is discharging the capacitor.
If I am, say, putting a capacitor across neutral and live of an ac cord, then I am charging it. Then if I unplug the cord and connect the live and neutral wires, I would be discharging the capacitor.
But ... you don't connect the wires of your plug. They are floating. If one is held at 300V from the capacitor because that was the voltage at the moment I broke the connection, then it will remain at 300V relative to the other forever.
Floating is the default state of disconnection. If I rip the capacitor straight out of the running machine, it will be floating and will usually keep its charge for years. If your remaining circuit doesn't contain something that can drain the capacitor, it will stay undrained.