[Issue 4274] Better array of inner structs error message

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jun 5 04:50:15 PDT 2010


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



--- Comment #2 from bearophile_hugs at eml.cc 2010-06-05 04:50:08 PDT ---
Structs defined inside functions keep a hidden pointer field to the function
they are into. If you return the array of nonstatic structs, the scope stops
existing and this pointer points to garbage. To avoid this you need 'struct
closures', but I prefer to avoid them.

-- 
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