In a large soup pot heat the butter over moderately high heat and add the onions, leeks, potatoes and reserved cobs. Reduce the heat to moderate and simmer the vegetables covered, for 8 - 10 minutes. Stir well every 3 minutes.
Add 8 cups of water and a pinch of salt and then bring to a boil and simmer on medium heat for 15 - 20 minutes. Remove the cobs, add the corn kernels and the heavy cream and cook the soup for 5 minutes or until the corn is tender. Add salt and pepper to taste.