The object lifetime (or life cycle) of an object in object-oriented programming is the time between an object's creation (also known as instantiation or construction) till the object is no longer used, and is destructed or freed.
Code to create object:
Employee *employeePtr;
employeePtr = new Employee;
Code to destroy object:
delete employeePtr;
employeePtr = NULL;
Post a Comment