Dude, if a variable is created within the loop (in the brackets) after the next iteration, it is destroyed.
[...]
Will give you error because Variable will not exist.
Please make use of proper English sentences (if you can) and don't use 'dude', this is a forum and not a chat/real life conversation.
When you write something like :
sf::Event event;
compiler create a block with size equal to sizeof(sf::Event) and place it in the data section of you executable (or just on stack), when you try to access the variable, compiler replace it with code, something like
mov eax, dword prt [address of structure + offset to variable]
Set a watch on event variable, go out of scope, in Watch you can see it filled with last handeled vars.
I bet getting down to C and ASM won't help him understand anything...
Raptor88 you should maybe take a closer look again at your C++ book, specially the memory managment part.
sf::Event event; indeed creates an instance on the stack, but it will be freed automatically whenever you leave the scope (as i514x said the { }-section). Thus you won't get any memory leak. Since the event class is quite thin the overhead of creating and destroying doesn't really have to bother you.
If you now, for some strange reason, would use
sf::Event* event = new sf::Event; the space will be allocated (= reserved on the 'heap') and if you'd do it every itereation and wouldn't call delete on it at the end of the main loop, you would create memory leaks non-stop. But as a side note, if you still would call delete at the end of the main loop, it wouldn't be guaranteed that your application doesn't produce memory leaks, beacause you could easily call
return 0; or
break; and exit the loop before you reach the delete statement. On top of that an exception could also completly jump over that delete statement. That's why smart pointers were introduces.