# Are limits of compact leaves compact?

Let $$M$$ be a compact smooth manifold, and $$\mathcal{F}$$ be a foliation on $$M$$. Assume that $$L$$ is a leaf of $$\mathcal{F}$$ for which there is $$x\in L$$ with the property that every neighborhood of $$x$$ in $$M$$ intersects a compact leaf of $$\mathcal{F}$$. Must $$L$$ itself be compact?

Note that the existence of such $$x$$ implies that all points of $$L$$ have the same property.

The conclusion that $$L$$ is compact seems to be true when the codimension of $$\mathcal{F}$$ equals one, and this goes back to Reeb. I am interested in what happens in general codimension, but particularly in the case where the codimension of $$\mathcal{F}$$ equals two.

Thanks.

Here's a counterexample where the foliation has codimension two. Consider the integral curves of a flow on the 3-torus $$\mathbb{R}^3 \, / \,\mathbb{Z}^3$$, defined by $$x' = 0, y'=\cos 2\pi x, z'=\sin 2 \pi x$$.
All leaves have constant $$x$$, and they are compact exactly when $$x$$ is rational. A leaf with irrational $$x$$ will not be compact, but any neighborhood of it will intersect a compact leaf.