4. Let $a$ and $b$ be integers, and one root of the equation $x^{2} + a x + b = 0$ is $\sqrt{4 - 2 \sqrt{3}}$. Then the value of $a + b$ is ( ).
(A) -1
(B) 0
(C) 1
(D) 2
4.B.

Notice that $\sqrt{4-2 \sqrt{3}}=\sqrt{3}-1$.
According to the problem, we have $(\sqrt{3}-1)^{2}+a(\sqrt{3}-1)+b=0$, which simplifies to $(a-2) \sqrt{3}+4-a+b=0$.
Thus, $a-2=0$ and $4-a+b=0$.
Solving these, we get $a=2, b=-2$. Therefore, $a+b=0$.