![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Abstraction Mechanisms, Part 1 - slide 11 : 36 |
No automatic memory managment in C++
Therefore it is attractive to attach resource management to construction and destruction of stack-allocated objects
The resource is encapsulated in a class together with allocation and release member functions
![]() | A class Resource and its application in the function use_resource - principles only. |
![]() | Program output - with no problem_condition. |
![]() | Program output - with a problem_condition. |