static void arrays under garbage control?
ketmar via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Feb 25 19:07:53 PST 2015
On Wed, 25 Feb 2015 20:20:37 -0600, captaindet wrote:
> On 2015-02-25 19:24, Adam D. Ruppe wrote:
>>> does this warning only apply to dynamic void[] arrays but not to
>>> static void[CTconstant] arrays?
>>
>> Both of those will be scanned for pointers.
>
> thanks, adam,
>
> so i should always use
>
> struct Stuff2Do{
> static ubyte[1024*1024] buffer4speed = void; // even if untyped at
> this point
>
> // more
> }
>
> to avoid that the GC is scanning my buffer for pointers?
compiler is clever enough to not mark `ubyte` arrays as GC ranges.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20150226/66dc65d5/attachment.sig>
More information about the Digitalmars-d-learn
mailing list