Actually, no. Nothing is destroyed in-so-far as the atoms being dissipated. Star Trek transporters disassemble your original matter and then beams it (move the original) to the new location using pattern buffers and an "angular confinement beam." Then it remotely reassembles your matter stream into its original configuration. It does this at a quantum level, thus preserving consciousness.
In that Riker episode, his matter stream hit some weird radiation cloud that just happened to have the right kind of matter in the cloud necessary to create a duplicate while his original matter was bounced back up and reconstructed on the Enterprise when the computer assumed the transport was going to fail.