Creating a new object...

In the constructor.

Calling the function...

In the function. Creating a new object...

In the constructor.

About to leave the function.

In the destructor.

About to delete the object...

In the destructor.

End of the script.