- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
class A
{
public:
A () : p (new SomeType)
{
assert ("It must be non-zero" && p);
}
~A ()
{
Box <SomeType> deleter (p);
p = 0;
}
private:
SomeType *p;
};
Setry 19.11.2012 15:35 # 0
bormand 19.11.2012 15:45 # +1
Steve_Brown 19.11.2012 17:53 # +1
И никаких проблем
TarasB 19.11.2012 16:39 # +1
guest 20.11.2012 13:53 # +6
defecate-plusplus 20.11.2012 14:26 # +7
absolut 20.11.2012 14:40 # +3
LispGovno 20.11.2012 15:05 # +1
Ящик Пандоры.
gb12335 28.11.2012 04:49 # +2
Steve_Brown 20.11.2012 17:01 # +1
LispGovno 20.11.2012 15:06 # 0