Knowledge of managed memory pointers

Orvid King via Digitalmars-d digitalmars-d at puremagic.com
Thu Apr 17 06:14:30 PDT 2014


I think the biggest advantage to this distinction would really be the
cross-language API's, the GC can determine which pointers it owns,
although I don't believe it currently exposes this capability.

On 4/17/14, Manu via Digitalmars-d <digitalmars-d at puremagic.com> wrote:
> On 17 April 2014 18:20, Kagamin via Digitalmars-d <
> digitalmars-d at puremagic.com> wrote:
>
>> You can do anything, what fits your task, see RefCounted and Unique for
>> an
>> example on how to write smart pointers.
>>
>
> ... what?
>
> I don't think you understood my post.
>
> void f(void* ptr)
> {
>   // was ptr allocated with malloc, or new?
> }
>
> If we knew this, we may be able to address some problems with designing
> better GC's, or cross-language API's.
>


More information about the Digitalmars-d mailing list