Thread overview |
---|
September 21, 2004 When is invariant created? | ||||
---|---|---|---|---|
| ||||
I don't have any invariant on my classes however all the methods make a call to _D9invariant12_d_invariantFC6ObjectZv and a loop is executed there what's that for? Ant |
September 21, 2004 Re: When is invariant created? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ant | "Ant" <duitoolkit@yahoo.ca> wrote in message news:pan.2004.09.21.01.51.57.386906@yahoo.ca... > I don't have any invariant on my classes > however all the methods make a call to > > _D9invariant12_d_invariantFC6ObjectZv > > and a loop is executed there > > what's that for? Because invariants are inherited, a default invariant is created if there isn't a user supplied one, and that default will call the base class' invariant. Compiling with -release will turn that off. |
September 22, 2004 Re: When is invariant created? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | On Tue, 21 Sep 2004 16:05:47 -0700, Walter wrote:
>
> "Ant" <duitoolkit@yahoo.ca> wrote in message news:pan.2004.09.21.01.51.57.386906@yahoo.ca...
>> I don't have any invariant on my classes
>> however all the methods make a call to
>>
>> _D9invariant12_d_invariantFC6ObjectZv
>>
>> and a loop is executed there
>>
>> what's that for?
>
> Because invariants are inherited, a default invariant is created if there isn't a user supplied one, and that default will call the base class' invariant. Compiling with -release will turn that off.
thanks, the release flag! I'm embarassed, it's on the docs...
Ant
|
Copyright © 1999-2021 by the D Language Foundation