Less known std.gc
Christopher Wright
dhasenan at gmail.com
Mon Nov 19 07:01:23 PST 2007
bearophile wrote:
> The std.gc module of Phobos contains various things that I don't undertand:
>
> void addRoot(void* p);
> void removeRoot(void* p);
> void addRange(void* pbot, void* ptop);
> void removeRange(void* pbot);
> void setTypeInfo(TypeInfo ti, void* p);
> void* getGCHandle();
> void setGCHandle(void* p);
>
> Maybe you can point me to some more info about their usage and usefulness, or some code that uses them. (I think the docs of Phobos can gain some usage examples of those functions).
>
> Bye and thank you,
> bearophile
There's nothing in any of that that allows you to allocate memory and
then say, "Let the garbage collector handle this from now on." I guess I
have to start writing code to delete the objects that I malloc'd; I have
an embarrassing amount of memory leaks now.
More information about the Digitalmars-d-learn
mailing list