[RFC] Proper initialization of class members and variables

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Sat Nov 19 12:42:02 GMT 2005


André Wöbbeking schrieb:

> On Saturday 19 November 2005 12:59, Thiago Macieira wrote:
> 
> 
>>I find it difficult to believe Windows would give one program's page
>>to another without zeroing it out first.
> 
> 
> would make spy software much easier ;-)
I don't know excatly, but when I compile a program in debug mode, msvc
fills the memory with 0xcd (and when it's deleted it gets filled with
0xcc or 0xdd - have to take a look into msdn...) - and that's the real
problem. Maybe in release it get filled with 0x00 but who knows and
therefore it should be initilaized correct by the programmer.

And it looks like gcc/mingw initialize it with zeros too - Ralf Habacker
wrote some code for qt3/free which did not work for me because he was
using gcc with unitialized variables and I with msvc got crashes...

Christian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20051119/128d6fbd/attachment.sig>


More information about the kde-core-devel mailing list