-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Should valueFormatter property use weak modifier? #1873
Comments
Would probably make sense. |
@petester42 There are three ways to solve this problem:
|
Where do you see it? In which class? |
@liuxuan30 It's in |
I filed a PR for related issues. |
I tested it today and found serious issues. If we apply weak, ChartsDemo won't display axis labels at all. Still investigating. |
Some findings:
You might want to check on your side to see if it's true. I use latest Xcode 8.2.1. Although it's strong, but the behavior indeed has changed to a Sitting down and think of this, I don't think it's a good practice to use weak regardless the problems I had above, but if we really do so, people need to retain the formatter somewhere. So using |
@liuxuan30 |
use weakSelf ;Still unable to release |
@931743010 just saying 'unable to release' can't help as from the code snippet, we can't say what's wrong. We don't have your project and even don't know if you retained self anywhere else. So if you want to prove it, make a simple project to reproduce. |
seems I've the same problem
…Sent from my iPhone
On 17 Mar 2017, at 2:41 PM, Xuan ***@***.***> wrote:
@931743010 just saying 'unable to release' can't help as from the code snippet, we can't say what's wrong. We don't have your project and even don't know if you retained self anywhere else. So if you want to prove it, make a simple project to reproduce.
―
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
if weakSelf indeed don't work, try use a separate class as the formatter. |
Tihs property is found in
Charts-Swift.h
file, it's a delegate, should it use weak modifier to avoid retain cycle?The text was updated successfully, but these errors were encountered: