Fix memory leaks in GenericCAO, ShaderSource and Player classes