In digging into a problem with Protocols.HTTP.Promise, I came across
an issue with inheritance and destructors.

#ifdef HTTP_PROMISE_DESTRUCT_DEBUG
# define PROMISE_DESTRUCTOR                           \
  protected void _destruct() { \
    werror("%O()._destruct()\n", object_program(this)); \
  }
#else
# define PROMISE_DESTRUCTOR
#endif

Activating this debug flag actually prevents the parent destructors
from being called. And simply adding ::_destruct() into there doesn't
work either, as that will break for anything that DOESN'T have a
_destruct in its parent.

How can this be solved generically? The symbol ::_destruct simply
can't be looked up (at compile time) if the parent doesn't have one.

ChrisA

Reply via email to