Skip to content
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

Memory problem after deallocating label's parent view. #44

Open
sfwalsh opened this issue Jan 25, 2019 · 2 comments
Open

Memory problem after deallocating label's parent view. #44

sfwalsh opened this issue Jan 25, 2019 · 2 comments

Comments

@sfwalsh
Copy link

sfwalsh commented Jan 25, 2019

We have a View that uses the CountdownLabel.
When the view is deallocated, the countdownlabel remains in memory.
screenshot 2019-01-25 at 15 01 37

The issue seems to be related to the LTMorphingLabel used inside the library:
screenshot 2019-01-23 at 20 55 33

I'm still able to see the issue after removing calls to the start timer function and setting the label to optional and manually nilling upon deinit.

Here's an example:

import CountdownLabel

final class SomeView: UIView {
  private var countdownLabel = CountdownLabel?
  
  init() {
    // setup label
    ...
  }

  func setupSubviews() {
    // setup constraints
  }

  deinit {
    self.countdownLabel?.cancel()
    self.countdownLabel?.removeFromSuperview()
    self.countdownLabel = nil
  }
}

Any ideas?

@Cez95
Copy link

Cez95 commented May 11, 2019

Any luck on this? @sfwalsh

@sfwalsh
Copy link
Author

sfwalsh commented May 13, 2019

Sadly not @Cez95 . Are you experiencing a similar problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants