Unable to remove item from dock in Yosemite

Solution 1:

Even though the items appeared not to be open, they were open. By holding down the right click on the icon, a drop down menu appeared with the option to "quit." Select that item, and the icon is removed.