Cavity

Will a new resin filling come out if I brush right away?

No, a resin filling will not come out if you brush right after treatment. Resin is hardened completely by curing light during the procedure, so brushing and eating are both fine the same day. That said, 1) if you had anesthesia, delay eating for the 1 to 2 hours until it wears off, since you could bite your lip or cheek, and 2) for a few days after treatment, rinsing with water after deeply colored foods such as coffee and curry helps prevent discoloration.