-
Notifications
You must be signed in to change notification settings - Fork 567
-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mixpanel instance still in memory and sending requests when app becomes active #285
Comments
Thanks so much for this detailed report. Very clear instructions. I will investigate and get back to you today. |
@NickyWeber I was able to reproduce this issue. Looking at a fix now. |
@samgreen Wow, that was fast, thank you very much. |
@NickyWeber So it occurs to me that this issue will not be easily resolved with the existing API. Since we create an internal instance for use as a singleton. We have an internal static variable that will stick around for the life of the application to allow easy access to Mixpanel once initialized. Can you tell me a bit more on a higher level, about what you're trying to accomplish and how this instance sticking around in memory is preventing that? |
We have implemented an opt out switch for the user. As soon as the user opts out any tracking has to be disabled. A nice property that will disable any kind of requests or a dedicated method to tell the tracker that a user opted out would do. |
Do the work arounds mentioned by #277 help at all? |
It doesn't. Disabling tracking in general has already been achieved except this one case. Can you provide a way to get rid off the singleton? |
@NickyWeber How about we add a global method, something like |
@samgreen That is a good solution. However I'd rather not have the tracker clutter the console for every event in general. Maybe just for a logging level of verbose? |
Async dispatch audit
iOS Version 8.3
Mixpanel verison 2.8.1
It seems as if you create an instance of Mixpanel with the
initWithToken...
method it will remain in memory still listening to events likeUIApplicationDidBecomeActiveNotification
.A breakpoint in
Mixpanel.m -applicationDidBecomeActive
should suffice to see the behaviour.Some steps to reproduce:
Mixpanel.m -applicationDidBecomeActive
When setting
This bug does not occur.
The text was updated successfully, but these errors were encountered: