In this way, the DFT is seen as a sampling of the DTFT when the signal is convolved with a window function, and explains why the spectrum of a signal is smeared when its period is not a multiple of the transform size. This textbook says "there is no leakage when the signal being analyzed is truly periodic and we can choose N to be exactly a period, or some multiple of a period" -- actually there still is, it's just that the DFT happens to sample precisely at the nulls of those sidelobes. The sidelobes are further seen as a consequence of the window function, and explains why certain window choices have better sidelobe attenuation at the tradeoff of wider main lobe/lower frequency resolution.