Advice wanted on garbage collection of sockets for c++ programmer using D
Guillaume Piolat via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Jun 28 06:19:37 PDT 2017
On Wednesday, 28 June 2017 at 13:02:04 UTC, Mike Parker wrote:
> On Wednesday, 28 June 2017 at 09:16:22 UTC, Guillaume Piolat
> wrote:
>
>>
>> So far everyone is ignoring my example when A needs B to be
>> destroyed. This happens as soon as you use DerelictUtil for
>> example.
>
> What's the issue with DerelictUtil?
https://forum.dlang.org/post/pmulowxpikjjffkrscct@forum.dlang.org
Not an issue with DerelictUtil, an issue with the strategy of
closing resources in GC with this case.
Derelict loaders work-around this by not unloading shared
libraries so the GC won't unload shared libs before the resources
related to the shared library are freed.
https://github.com/DerelictOrg/DerelictAL/blob/master/source/derelict/openal/dynload.d#L366
More information about the Digitalmars-d-learn
mailing list