Let $X$ be a compact complex $n$-manifold and $D$ be a smooth comdimension $1$ submanifold. Also let $U:= X\setminus D$ and $j$ be the inclusion of $U$ in $X$. Then it is well known that the following (long exact) sequence respects mixed Hodge structures:
$$ \cdots\to H^{k-2}(D)(-1)\stackrel{\gamma_k}{\to}H^k(X)\stackrel{j^*}{\to}H^k(U)\stackrel{\text{Res}}{\to}H^{k-1}(D)(-1)\to\cdots.$$
Here $\gamma_k$ is the Gysin map obtained as the Poincare dual of $H^{2n-k}(X)\to H^{2n-k}(D)$. And $\text{Res}$ is the residue map that knocks off a factor of type $\frac{dz}{z}$ from a form.
My question: Where does one needs compactness of the manifold/ variety $X$? If one were to work with non-compact $X$, would the above sequence respect the mixed Hodge structure?