February 28, 2014
On Friday, 28 February 2014 at 13:06:05 UTC, Namespace wrote:
> What can still take a long time. It annoys me very much that with arrays I can not rely on that the struct DTors are called.

Yep, this bug has immediately got my vote :) It does require someone knowledgable of GC to fix in forseeable future unfortunately.
February 28, 2014
On Friday, 28 February 2014 at 13:16:40 UTC, Dicebot wrote:
> On Friday, 28 February 2014 at 13:06:05 UTC, Namespace wrote:
>> What can still take a long time. It annoys me very much that with arrays I can not rely on that the struct DTors are called.
>
> Yep, this bug has immediately got my vote :) It does require someone knowledgable of GC to fix in forseeable future unfortunately.

I will vote, too. It's somewhat strange: Since it works with delete it should also work with the current GC, or? Someone should figure out why and how delete works this way. :)
February 28, 2014
On Friday, 28 February 2014 at 13:32:33 UTC, Namespace wrote:
> I will vote, too. It's somewhat strange: Since it works with delete it should also work with the current GC, or? Someone should figure out why and how delete works this way. :)

Well, delete is deprecated so it can do any kind of arcane horrors :)

More idiomatic destroy + GC.free pair will work because destroy is a template function.
February 28, 2014
On Friday, 28 February 2014 at 13:38:59 UTC, Dicebot wrote:
> On Friday, 28 February 2014 at 13:32:33 UTC, Namespace wrote:
>> I will vote, too. It's somewhat strange: Since it works with delete it should also work with the current GC, or? Someone should figure out why and how delete works this way. :)
>
> Well, delete is deprecated so it can do any kind of arcane horrors :)
>
> More idiomatic destroy + GC.free pair will work because destroy is a template function.

No, currently it is not deprecated. It is suggested to be deprecated. :P
And destroy doesn't finalize the data. :/ See: http://forum.dlang.org/thread/bug-12256-3@https.d.puremagic.com%2Fissues%2F and http://forum.dlang.org/thread/bug-12274-3@https.d.puremagic.com%2Fissues%2F
But that is only a workaround. I don't want to call every time "arr.finalize" because the GC is silly...
I meant that someone should analyse the internal delete code and implement something like this for the current GC related to struct arrays (and AA's).
February 28, 2014
On Friday, 28 February 2014 at 14:08:11 UTC, Namespace wrote:
> No, currently it is not deprecated. It is suggested to be deprecated. :P
> And destroy doesn't finalize the data. :/ See: http://forum.dlang.org/thread/bug-12256-3@https.d.puremagic.com%2Fissues%2F and http://forum.dlang.org/thread/bug-12274-3@https.d.puremagic.com%2Fissues%2F
> But that is only a workaround. I don't want to call every time "arr.finalize" because the GC is silly...

"intended to be deprecated" is a better word. There is not a smallest chance it will stay in the long term, better get used to it.

Quick solution would have been to merge "finalize" with destroy itself. As I have mentioned, it is a template and has all necessary information for traversal.

Proper solution will be to fix the struct destructor bug as it is the root cause for your array issues too and then patch destroy to only do traversal when pointers are not owned by GC.

> I meant that someone should analyse the internal delete code and implement something like this for the current GC related to struct arrays (and AA's).

I am too scared of what I may find :)
February 28, 2014
On Friday, 28 February 2014 at 14:47:31 UTC, Dicebot wrote:
> On Friday, 28 February 2014 at 14:08:11 UTC, Namespace wrote:
>> No, currently it is not deprecated. It is suggested to be deprecated. :P
>> And destroy doesn't finalize the data. :/ See: http://forum.dlang.org/thread/bug-12256-3@https.d.puremagic.com%2Fissues%2F and http://forum.dlang.org/thread/bug-12274-3@https.d.puremagic.com%2Fissues%2F
>> But that is only a workaround. I don't want to call every time "arr.finalize" because the GC is silly...
>
> "intended to be deprecated" is a better word. There is not a smallest chance it will stay in the long term, better get used to it.
>
> Quick solution would have been to merge "finalize" with destroy itself. As I have mentioned, it is a template and has all necessary information for traversal.
>
> Proper solution will be to fix the struct destructor bug as it is the root cause for your array issues too and then patch destroy to only do traversal when pointers are not owned by GC.
I'm not sure if that is possible with the current gc. But I hope it!
>> I meant that someone should analyse the internal delete code and implement something like this for the current GC related to struct arrays (and AA's).
>
> I am too scared of what I may find :)

1 2
Next ›   Last »