Say you're creating a texture object but you don't have the data for it yet. You might think that you need to allocate a dummy buffer of the right size, but you actually don't. Just give glTexImage2D a NULL pointer and it will happily create the texture for you.
It's all there in the documentation ().