C++ has pointers specifically because it inherits C's memory and array model. Dynamic memory allocated with malloc()/calloc() must be explicitly released with free(); dynamic objects created with new must be explicitly released with delete or delete[].
You can't use Java-style dynamic syntax in C++. The new operator returns a pointer, not an object.
string s = new string("invalid indirection error");
...fails because the string s is not compatible with the (string*) returned by new. You could hack this to look almost like Java:
string s = *new string("memory leak");
This compiles, and will:
1. create a new string object named "s" in the runtime stack
2. create a new unnamed string object on the heap and initialized it to "memory leak"
3. call the string assignment operator on s with the unnamed string as an argument, which will copy the unnamed string's data, without changing or destroying it
4. forget about the unnamed string...there's no way to delete it because it has no name.
Wrap that in an infinite loop and watch your system's memory utilization climb until the program finally throws an out-of-memory exception. This is the sort of thing that C++, like C with malloced memory that doesn't get freed, will silently let you do; and it's called a "memory leak" because, while your program is running it looks like available memory is leaking out of a hole somewhere.
Proper handling of pointer variables is essential to effective C++ programming. References work great for function/method arguments, but reference variables are nearly useless.
Edit: Fixed a couple of typos.