-
-
Notifications
You must be signed in to change notification settings - Fork 380
Issue 9691: document void[] arrays. #715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
have been implicitly converted from an array of pointers or an array of | ||
elements that contain pointers. Casting an array that contains pointers to | ||
$(D ubyte[]) may run the risk of the GC collecting live memory if it | ||
becomes the only remaining references to the pointers' targets.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this behavior guaranteed to not change with rewrites or replacements of the GC?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea. Maybe @WalterBright or @andralex might know better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that should be left for future edits. The spec should reflect what's in the language now (just as it already does everywhere else).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
" Casting an array that contains pointers to $(D ubyte[]) may run the risk of the GC collecting live memory"
Casting an array will not change whether the GC scans the memory, this is determined by how it is allocated. The former would need some runtime call for casts, and I don't think this would pass Walter's scrutiny. I'd replace this with "Allocating an array that contains pointers $(D ubyte[]) ..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Since this PR already merged, here's the follow-up fix for this paragraph: #716
LGTM! I'm merging this. |
Issue 9691: document void[] arrays.
Thanks! |
Fixes: https://issues.dlang.org/show_bug.cgi?id=9691
Also, revamped the heading levels in
arrays.dd
, which were all over the map before.