Suppose I wish to compute the integral $$ I = \oint_C dz f(z,{\bar z}) $$ where the contour $C$ is given. Obviously, the answer will depend on the contour chosen. I know the standard way to do this (standard from where I learnt it anyway). One simply takes $z = re^{i \theta}$ and ${\bar z} = r e^{- i \theta}$. The contour is then given by $r = r(\theta)$. The integral then becomes $$ I = \int_0^{2\pi} d \left( r(\theta)e^{i \theta} \right) f \left( r(\theta) e^{i \theta} , r(\theta) e^{- i \theta} \right) $$
QUESTION:
I am wondering if the following method also works. In the complex coordinates, the contour may be given by ${\bar z} = g(z)$. (Let us for simplicity, consider only contours that can be written in the form above) We can then write the integral as $$ I = \oint_C dz f \left(z, g(z) \right) $$ Now we have a contour integral over a holomorphic function. We can now simply use Cauchy residue theorem to evaluate the contour integral. Will this give the correct answer?