comment from a book: “ With dynamic memory allocation, however, the compiler doesn’t know how much storage you’re going to need, and it doesn’t know the lifetime of that storage. That is, the storage doesn’t get cleaned up automatically. ”

I don’t fully understand above statement.
If I say:
Code:
new unsigned char[100];
Does that mean the compiler do not know that I want 100 new bytes?
And what’s the meaning of that the compiler doesn’t know the lifetime of that new storage? If I create a variable using new inside a function, isn't it's life time is that function?
Please explain.

Thanks a lot.