On Tue, Mar 12, 2002 at 12:28:10AM +0100, Lars Gullik Bjønnes wrote:
> | Can you please give an example for the brain dead amongst us ?
> 
> class Foo {
>       // unsafe variant
>       Foo()
>       : bar1(new Bar), bar2(new Bar)
>       {}
>       // safer variant
>       Foo() {
>             bar1 = new Bar;
>             bar2 = new Bar;
>       }
> private:
>         Bar * bar1;
>         Bar * bar2;
> };

Bad example. No class should contain more than one raw 'owned' pointer
is a better rule...

Andre'

-- 
André Pönitz .............................................. [EMAIL PROTECTED]

Reply via email to