Is spectral leakage due to windowing 'different' for the DTFT and DFT? I'm currently trying to improve my foundational understanding of spectral leakage due to windowing. The more I have been reading about it, the more I'm starting to think that 'windowing spectral leakage' can mean two completely different things depending on whether you're talking about the DTFT or DFT. I'm hoping to get some confirmation/clarification on what I discuss.


With regards to the DTFT, this transform is essentially the Fourier transform equivalent for a discrete signal. This transform assumes that the signal is periodic with that period being infinity. With regards to windowing, spectral leakage is induced due to the fact that you are multiplying a discrete signal $x[n]$, by some window function $w[n]$. The corresponding convolution in the frequency domain causes the spectrum of $X[f]$ to be smeared or 'leaked'.
Now moving onto the DFT, the idea of spectral leakage induced by windowing seems to be a completely different concept. Unlike the DTFT, the DFT assumes the signal is periodic (with that period being less than infinity). In this context, it is often stated that spectral leakage will occur if the collected signal does not contain an integer multiple number of points to the digital frequencies contained (i.e. if you have a $3\textrm{ Hz}$ signal with sample rate $10$ samples/sec, and collect $18$ samples, you will have spectral leakage). Thus if you recorded a sinusoid at interval where it's not able to 'finish' a complete cycle, the next period will restart and there will be a discontinuity in the signal. While this makes sense that you would be inducing 'false' frequencies or leaking frequencies, it seems to be a completely different idea from the convolving concept of the DTFT.


My primary question: 


Is 'window spectral leakage' completely dependent on context (DTFT vs DFT)?
Furthermore, is it safe to say that the spectral leakage induced by each case separate from one another? As in, spectral leakage from the DTFT is induced by frequency convolution, and spectral leakage from the DFT induced by the assumption of periodicity? Or is there something that ties these two things together?
The concept of spectral leakage is not dependent on the context, and it's the same thing for the DTFT as it is for the DFT. It's probably helpful to remember that the DFT of a finite length sequence equals a sampled version of the DTFT of the same sequence:

$$\begin{align}X(\omega)&amp;=\sum_{n=0}^{N-1}x[n]e^{-jn\omega}\qquad\text{(DTFT)}\\
\tilde{X}[k]&amp;=\sum_{n=0}^{N-1}x[n]e^{-jn\frac{2\pi k}{N}}\qquad\text{(DFT)}\end{align}$$

Obviously we have

$$\tilde{X}[k]=X\left(\frac{2\pi k}{N}\right)$$

Now assume we have two sinusoidal signals windowed with a rectangular window such that in one case there's an integer number of periods inside the window, and in the other cases there isn't:



In both cases we get spectral leakage due to the windowing process. However, in the first case, the samples of the DTFT computed by the DFT are all at the zeros of the DTFT (except for one sample at the sinusoid's frequency). This is not the case for the second signal. That means that in the first case the DFT doesn't "see" the spectral leakage due to the sampling process, but in the other case the spectral leakage is also visible in the DFT.

These two cases are shown in the figure below. The DTFT is shown in blue, and the corresponding DFT is in red: