Bad reasoning, sorry. Infact saying it in public may be a form of riya *depending on your intention*e.g. if you're doing it so people think that you are someone who does istighfar and thus give you some respect or acknowledgment, then that may be a form of riya, which actually adds on to your sin rather than disipates it :S. That is why, if I am not mistaken, it is reported in hadith that Prophet Muhammad PBUH said that he feared this thing more upon the ummah than the dajal (CORRECT ME IF I'M WRONG)