On 11/14/13 07:52, Richard Biener wrote:
Another advantage of this class is it puts the bitmap_head struct on the stack
instead of mallocing it or using a obstack.
Hm, but then eventually you increase the lifetime of the bitmap
until the scope closes.
Yea, but often that's when we're releasing them anyway ;-) I don't
think we've gone to too much trouble to try and release the bitmaps as
soon as they're no longer needed. Releasing at end of scope seems fine
to me.
I'm a fan of RAII style code. It's less error prone and often results
in code that is easier to understand because the code isn't cluttered
with resource de-allocation either in if bodies or in blocks reached by
gotos.
Jeff