Validated PNotifier class.
This uses a mechanism to assure the caller that the target class still exists rather than simply calling through a pointer as the base PNotifierFuntion class will. Thus the call simply will not happen rather than crash.
A notification target class must derive from PValidatedNotifierTarget, usually as a multiple inheritance, which will associate a unique ID with the specific class instance. This is saved in a global table. When the object is destoyed the ID is removed from that table so the caller knows if the target still exists or not.
As well as deriving from PValidatedNotifierTarget class, the notifier functions must be declared using the PDECLARE_VALIDATED_NOTIFIER rather than the usual PDECLARE_NOTIFIER macro.