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

Retain cycle with AddArtistsViewController and AddArtistsViewModel #7

Open
ThasianX opened this issue Dec 23, 2019 · 0 comments
Open
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@ThasianX
Copy link
Owner

Description

Navigating out of the AddArtistsViewController doesn't deallocate the AddArtistsViewController and the AddArtistsViewModel. These are signs of a retain cycle.

Expected Behavior

A message in the console should print out that AddArtistsViewController and the AddArtistsViewModel were deallocated.

Actual Behavior

No message in the console prints out that AddArtistsViewController and the AddArtistsViewModel were deallocated.

Steps to Reproduce the Problem

  1. Run the app and navigate to the New Releases screen.
  2. Click the portfolio icon at the top right, taking you to the portfolio page
  3. Click the add button at the top right of the portfolio, taking you to the add artists page
  4. Swipe downwards to dismiss the modal view.
  5. Look at the console: only the AddArtistsCoordinator was deallocated.

Possible solution

I think it has something to do with the SearchController and the AddArtistsViewController's strong reference to it. Could play around with 'weak' and see what happens.

Specifications

  • XCode Version: 11
@ThasianX ThasianX added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant