Andre Poenitz <[EMAIL PROTECTED]> writes:
| On Tue, Mar 12, 2002 at 09:32:07AM +0100, Lars Gullik Bjønnes wrote:
>> | Bad example. No class should contain more than one raw 'owned' pointer
>> | is a better rule...
>>
>> And _way_ harder to enforce..., and also please explain why this is a
>> bad
On Tue, Mar 12, 2002 at 09:32:07AM +0100, Lars Gullik Bjønnes wrote:
> | Bad example. No class should contain more than one raw 'owned' pointer
> | is a better rule...
>
> And _way_ harder to enforce..., and also please explain why this is a
> bad example? And why shouldn't a class contain more t
Andre Poenitz <[EMAIL PROTECTED]> writes:
| 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)
>> {}
>>
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() {
>
On Mon, Mar 11, 2002 at 11:24:49PM +0100, Lars Gullik Bjønnes wrote:
> I just got a new book :-)
That's fine for you.
> -
> Always perform unmanaged resource acquisition in the constructor body,
> never in initializer lists.
> -
>
> -
> Perform every explicit resource allocation (fo
John Levon <[EMAIL PROTECTED]> writes:
| On Mon, Mar 11, 2002 at 11:24:49PM +0100, Lars Gullik Bjønnes wrote:
>
>> Always perform unmanaged resource acquisition in the constructor body,
>> never in initializer lists.
>
| Can you please give an example for the brain dead amongst us ?
class Foo {
On Mon, Mar 11, 2002 at 11:24:49PM +0100, Lars Gullik Bjønnes wrote:
> Always perform unmanaged resource acquisition in the constructor body,
> never in initializer lists.
Can you please give an example for the brain dead amongst us ?
regards
john
--
I am a complete moron for forgetting about
I just got a new book :-)
More Exceptional C++, and I found a couple of nice rules that I want us to
adopt:
-
Always perform unmanaged resource acquisition in the constructor body,
never in initializer lists.
-
-
Perform every explicit resource allocation (for example, new) in its