1 Reply Latest reply on Aug 5, 2011 2:58 PM by csa

    Activities not getting disposed of?

    craiggreenhalgh

      Hi I'm using MVP with activities, places and views.

       

      During the "start" method of the activity, I subscribe to responses on a bus (Errai Bus).

       

      When I navigate back to the same place and activity a new set is created (as expected), however if the event is fired, two (or multiple) activities listeners are called

       

      When are these activities supposed to be disposed of?

       

      What is the difference between subscribe and subscribeLocal ?

       

      Thanks for your help

        • 1. Re: Activities not getting disposed of?
          csa

          That depends on your application design. If you really want to bind a subscription to an activity you will probably have to unsubscribe when the activity ends (in onStop()).

           

          <What is the difference between subscribe and subscribeLocal ?>

          subscribeLocal can be used to subscribe to local messages only.