Flushing Arduino

That's either a bug in your new code, or a failure to upload the new code to the Arduino (and the IDE would have generated an error if that had occurred). The act of uploading a new program overwrites the previous program, no other steps need to be taken.