This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 11/14/13 07:52, Richard Biener wrote:
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.Another advantage of this class is it puts the bitmap_head struct on the stackinstead of mallocing it or using a obstack.Hm, but then eventually you increase the lifetime of the bitmap until the scope closes.
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
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |