Skip to content

Conversation

quickfur
Copy link
Member

@quickfur quickfur commented Dec 5, 2014

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.

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.)
Copy link
Contributor

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?

Copy link
Member Author

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?

Copy link

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

Copy link
Member

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[]) ..."

Copy link
Member Author

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

@ghost
Copy link

ghost commented Dec 5, 2014

LGTM! I'm merging this.

ghost pushed a commit that referenced this pull request Dec 5, 2014
Issue 9691: document void[] arrays.
@ghost ghost merged commit 436291b into dlang:master Dec 5, 2014
@quickfur quickfur deleted the issue9691 branch December 5, 2014 22:41
@quickfur
Copy link
Member Author

quickfur commented Dec 5, 2014

Thanks!

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants