(whoops, correcting my own post!): > sva->refcount=0; > sva->refcount++; // these first 2 combined if we get the implemention right > svb->refcount=0; > svb->refcount++; // ditto sva->refcount++; > ... > if (--sva->refcount == 0) ... // branch not taken > if (--svb->refcount == 0) ... // branch taken, > if (--sva->refcount == 0) ... // branch taken > > which I calculate as 7 writes and 5 reads. make that 8 and 6.
- Re: Meta-design Piers Cawley
- Guaranteed object destruction ... Dan Sugalski
- Re: Guaranteed object destruct... Nicholas Clark
- Re: Guaranteed object destruct... Piers Cawley
- Re: Guaranteed object destruct... Dan Sugalski
- Re: Guaranteed object destruct... Piers Cawley
- RE: Meta-design David Mitchell
- Re: Meta-design Simon Cozens
- Re: Meta-design Jarkko Hietaniemi
- Re: Meta-design mooring
- David Mitchell