I'm usually able to limit my intake by never making sweet treats at home (unless it's something like homemade toffee that's getting packaged up quickly for a holiday gift).
Why? As I've mentioned here many times before, if I fix a whole batch goodies at home, I'll be the only one to eat them...and too quickly at that.
True fact about me: If I know there are sweets in the house (the only exception is bar chocolate) then my brain goes into devious let's-rationalize-why-we-deserve-the-sweet-thing-right-this-second-all-throughout-the-day mode. Because of this, it makes way more sense for me to a buy dessert by the slice or individual serving from a bakery when a craving strikes.