Potential Memory Leak in Container (context)
chpapa opened this issue · comments
Ben Cheng commented
L52-53 in the following file are using context passed from the constructor. In case if the user passes an inappropriate context (such as an ActivityContext), the container will hold it forever.
On L50, this.context
is an application context which I guess was suppose to be used instead of context
.
So if I understand correctly, we should either:
- The container will just use context supplied, and our docs/guides/samples should use context according to the lifecycle of the container; OR
- L52-53 should use Application Context (
this.context
) instead.