I am exploring the Bound services in Android. I came across below line in Android developer documentation about the Bound service.
Multiple clients can connect to the service at once. However, the system calls your service's onBind() method to retrieve the IBinder only when the first client binds. The system then delivers the same IBinder to any additional clients that bind, without calling onBind() again.
As mentioned here, it seems Android system is using an already existing IBinder
to return to additional clients.
Is this implementation is loosely based on concept of Flyweight Design pattern? As we know, Flyweight pattern is primarily used to reduce the number of objects created and to decrease memory footprint and increase performance.
How this is actually achieved?
Aucun commentaire:
Enregistrer un commentaire