static void arrays under garbage control?
captaindet via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Feb 25 17:15:41 PST 2015
if i understand correctly, static arrays are exempt from GC scanning for memory pointers
http://dlang.org/garbage.html : "Pointers in D can be broadly divided into two categories: Those that point to garbage collected memory, and those that do not. Examples of the latter are pointers created by calls to C's malloc(), pointers received from C library routines, pointers to static data."
but there is also a warning for void arrays
http://dlang.org/arrays.html : The garbage collector "will scan void[] arrays for pointers, since such an array may have been implicitly converted from an array of pointers or an array of elements that contain pointers."
does this warning only apply to dynamic void[] arrays but not to static void[CTconstant] arrays?
(because sometimes the docs also mean static arrays even if just "type[]" is written.)
thanks!
ps: this is for 32bit apps
More information about the Digitalmars-d-learn
mailing list