A thread-safe weak reference implementation

Andrej Mitrovic andrej.mitrovich at gmail.com
Wed Jul 10 08:39:16 PDT 2013


On 3/14/12, Alex Rønne Petersen <xtzgzorex at gmail.com> wrote:
>          auto ptr = cast(size_t)cast(void*)object;

I think this should be:

auto ptr = cast(size_t)*cast(void**)&object;

The object might have an opCast method, and this is one way to avoid
calling it by accident.


More information about the Digitalmars-d mailing list