That would work because the osmotic shock of exposing the bacteria to the high sugar environment would kill them. (In simple language: the sugar would "pull out" the water from inside the bacteria, killing them.)
When am I going to learn to read the whole thread before I stick my 2 cents in? Very well said!