Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I read through the page, but nothing popped out to me as saving memory. Am I missing something obvious? They both look like they cost 1 static counter, plus sizeof(class instance with no member variables) per translation unit the header is included in.


In the alternate version, only one instance of the initializer object is maintained. In the standard version, there's one object instantiated and maintained for every file that included the header.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: