The object is always destroyed when it goes out of scope - this is not java. f Will get destroyed where you indicate and will never be destroyed at the end of func. in general the destructors are called in order reverse to the order of their construction.