The problem is that by killing the dog the fleas simply do what fleas do and flee — to another host.
I left off the ‘sarc’ tag.