My original memory allocator reliably initialized memory to all zeros.  
It saves a lot of code.

Note that Java follows the same convention for the same reasons.

All that said, the C++ "new" does not, and while I from time to time use 
a custom, high performance "new", it is just too dangerous to depend on 
non-standard behavior.

I'm not surprised that there is still code that follows the original 
convention.  If it were me, I'd phase it out.

On 3/26/2014 9:05 AM, Dimitry Sibiryakov wrote:
>     Hello, All.
>
>     It seems that at least one piece of code relies on fact that members of a 
> newly
> allocated structure are always initialized to zero without explicit 
> initialization in
> constructor. Is it a latent bug or a feature of Firebird memory manager?
>


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to