Is it possible to deinitialize the class without calling the gc?

Jonathan M Davis newsgroup.d at jmdavisprog.com
Sat Aug 4 03:54:17 UTC 2018


On Saturday, August 04, 2018 03:25:12 12345swordy via Digitalmars-d wrote:
> On Saturday, 4 August 2018 at 02:21:48 UTC, 12345swordy wrote:
> > Are you telling me that D is incapable of determining the
> > classes that is currently inheriting the parent class? That not
>
> *Create a list of child classes that is currently inheriting the
> parent class.

D is not capable of giving you the list of classes that are derived from a
particular class. Stuff like separate compilation makes that not work.

It can tell you what the base classes are for a particular class, which is
what I would think you would need for stuff related the attributes that a
destructor/finalizer arguably should have (e.g. if D actually had attribute
inheritance for destructors), but it can't give you a list of classes
derived from a particular class. If you need that for some reason, then
you're out of luck.

- Jonathan M Davis



More information about the Digitalmars-d mailing list