- Modern C++:Efficient and Scalable Application Development
- Richard Grimes Marius Bancila
- 58字
- 2021-06-10 18:28:16
Using objects with pointers
Objects can be created on the free store and accessed through a typed pointer. This gives more flexibility because it is efficient to pass pointers to functions, and you can explicitly determine the lifetime of the object because an object is created with the call to new and destroyed by the call to delete.