Window functions and the Fourier transform
So called spectral leakage always occurs when transforming any finite length observation.  That's because it's an artifact of windowing, and any non-infinite length observation (-t/2 ... +t/2) requires some sort of window, inherent rectangular or otherwise.  A window function allow you to choose your artifact: from window "distortion" to Sinc effects, and/or many other choices.