title: weakreference vs eventbus to avoid memory leaks android?
body: <p>I am developing an application in which I am using retrofit library for calling the web services . After calling web-service a callback return Response then I am passing the Response to the next activity. I want to know the best approach for this .</p>
  
  <p>I am new in memory related problems please correct me if I am totally wrong.</p>
  
  <p>Shall I make a new class then pass a weak reference to that class and call the function from that class on the main activity.</p>
  
  <h1>Or</h1>
  
  <p>I shall register a new event on event bus and when the callback returns the object ,fire the event and call the function.</p>
  
  <p>Please consider what is good to avoid Memory Leaks.</p>