14 Feb
2003
14 Feb
'03
1 p.m.
From: Peter Dimov [mailto:pdimov@mmltd.net] [snip] A zero-overhead scoped_ptr
would require a helper class here:
Yes, and I shouldn't have said scoped_ptr
scoped_ptr
p(hPrinter, &ClosePrinter); that would increase sizeof(scoped_ptr) and is of questionable utility. :-)
Actually, I kind of like it. :-)
There is always the option to define a dedicated printer class, of course.
Yep, but there are hundreds of cases like this, which is why the feature would be useful. One could argue the same for the resource management of any type, right? ;-) Bjorn Karlsson