Assume Emp is a class
here, is o itself the object? , if so how is memory allocated for it, implicity via call to new or malloc() ?Code:Emp o;
in C++ when objects go out of scope their destructors are automatically calledCode:Emp *o = new Emp();
so, what if i dont call
and let the pointer go out of scope, for it to call the destructor for the object automatically?Code:delete o;