operational amplifier
This is a peak detector circuit. The capacitor is indeed discharged by the diode leakage current but the discharge rate is very slow, hence a very small value capacitor should be used. Reverse-biased (voltage blocking) diodes have non-zero leakage current, typically measured in nA (1N4148 has ~ 25 nA leakage current).
New Energy Sources WhatsApp