Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Parent graphs can be deinited while a child graph is still alive #42

Closed
holmes opened this issue Mar 2, 2017 · 7 comments
Closed

Parent graphs can be deinited while a child graph is still alive #42

holmes opened this issue Mar 2, 2017 · 7 comments
Labels

Comments

@holmes
Copy link
Collaborator

holmes commented Mar 2, 2017

This crashes the app pretty hard at Graph.swift#280 where let self = self!

@SunnyDayDev
Copy link

I have got the same issue. I will try to gather information how to reproduce it. May be you know how do it better?

@holmes
Copy link
Collaborator Author

holmes commented Jul 17, 2018

I haven't looked at this in a long time. If you can repro on a small project we can take another look.

@sebastianv1
Copy link
Contributor

Closing because this issue hasn't received any activity lately, feel free to reopen if it's still an issue.

@SunnyDayDev
Copy link

SunnyDayDev commented Feb 28, 2019

I've created the project which reproduce the issue:
https://github.com/SunnyDayDev/bugreproduce-cleanse

@sebastianv1
Copy link
Contributor

Thanks for the repo project! Will likely take a look this weekend or early next week.

@sebastianv1 sebastianv1 reopened this Feb 28, 2019
@sebastianv1
Copy link
Contributor

@SunnyDayDev It appears the root of the issue is using a PropertyInjector type as the Root object. Using a UIViewController or UIWindow type for the root does not deinit the graphs.
So in the sample project, in AppComponent.swift, we could instead set the Root type as:
typealias Root = UIWindow.

I'll keep digging how to make the PropertyInjector retain an instance to subgraphs.

@sebastianv1 sebastianv1 added the bug label Oct 5, 2019
@sebastianv1
Copy link
Contributor

PR to resolve (#122). PTAL!

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

No branches or pull requests

3 participants