If $f(z)$ is continuous on $\Omega$ (open) and has a simple pole at $z=a$ on $\Omega$, then $f$ has no primitive function on the punctured open neighborhood of $z=a$ and thus the integral over a circle, say centered at $a$, will not vanish.
In the case $f(z)$ has a pole of order $> 1$ it has also a primitive function except at the poles. According to a theorem, if $f(z)$ has a primitive function then the integral over a simply closed path will vanish.
From the book I am learning complex analysis from it is not clear; if the integral of $f(z)$ over the closed path will also not vanish if $f(z)$ has a pole of order $>1$? More generally, in which cases does the integral of a complex function over a closed path vanish since a holomorphic function must not have a primitive function?
Thanks for your comment.