[Issue 2642] ClassInfo.init contains zeroes

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jul 9 02:47:55 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2642





--- Comment #9 from Sobirari Muhomori <maxmo at pochta.ru>  2009-07-09 02:47:55 PDT ---
> With or without explicit initialization requirements, you could put that
> initialization in the constructors.
.init can't be moved to constructor, because you won't be able to set vptr
correctly.

Possible solution is to generate .init as a static function and inline it (or
not) in the user code after call to new. Then call constructor. And trusting
malloc to zero memory can be a good optimization.

And I don't think .init for primitive types is copied as an array of bytes.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list