Skip to content

Commit

Permalink
Update ex18.1.2.3.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
qwert2603 authored and pezy committed Apr 26, 2015
1 parent d64f05c commit 9eee8b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ch18/ex18.1.2.3/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ void exercise(int *b, int *e)
intArray p(v.size());

//! approach 2:
//std::shared_ptr<int> p(new int[v.size()]);
//std::shared_ptr<int> p(new int[v.size()], [](int *p) { delete[] p; });
// delete array using lambda

std::ifstream in("ints"); // the object in will be destroyed.
// exception occurs here
Expand Down

0 comments on commit 9eee8b8

Please sign in to comment.