Associating mediators at run time

Run-time association of colleagues is performed using the AddMediator function. The AddMediator function is a member of the IPKIFMediator interface and is defined as follows:

 
void AddMediator(IPKIFMediator* m, bool transferOwnership = false);

 
Mediator association has no optional memory management-related parameter. Applications are responsible for handling clean up of mediators as well as for ensuring that mediators are not prematurely destroyed while an association is active.