Ignore:
Timestamp:
Mar 18, 2013, 6:29:41 PM (13 years ago)
Author:
Frederik Heber <heber@…>
Children:
3f30cc
Parents:
b9273a
git-author:
Frederik Heber <heber@…> (03/18/13 18:22:47)
git-committer:
Frederik Heber <heber@…> (03/18/13 18:29:41)
Message:

Channels and Notifications pass on subjectKilled().

  • if we only sign on to a single notification channel, we miss on subjectKilled() completely. Hence, we have to chance of properly signing off again or, at least, to know that we must not anymore.
  • Hence, Observable's dstor now calls subjectKilled() on its Channels which passes the call on to all its Notifications that in turn use the subjectKilled() slot of their targets along with the passed-through Observable instance.
  • also added observerLog verbosity when signing on/off to channels.
  • explained this in header documentation of Observable, Channels, and Notification.
  • TESTFIX: ObserverUnitTest did not properly signOff() before deleting instances in relayNotificationTest().
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodePatterns/Observer/Observable.hpp

    rb9273a r1c291d  
    3030 * to avoid memory issues when many observable are around but only few
    3131 * are actually observed.
     32 *
     33 * \note We have to clean our Channels from static NotificationChannels and
     34 * we call Channels::subjectKilled() to let Observers that have only signed
     35 * on to single channel still know when their observable has died.
    3236 */
    3337class Observable : public Observer {
Note: See TracChangeset for help on using the changeset viewer.