Git Product home page Git Product logo

Comments (2)

remenkoff avatar remenkoff commented on August 19, 2024

@wtsnz, I found solution for your example. Just declare your Optional delegates as a weak, like so:

weak var delegate: NewOrderCoordinatorDelegate? = nil

(actually, nil here isn't required, cause Optionals are nil by default)

...and so:

weak var delegate: DrinkTypeControllerDelegate?
weak var delegate: SnackTypeViewControllerDelegate?
weak var delegate: SplashViewControllerDelegate?

And we get absolutely another picture:
2017-03-08 18 52 19

All generations made in the following order:

  1. root -> add (cancel) -> root (x5 times);
  2. root-> add (coffee) -> add (muffin) -> root (x5 times);
  3. etc.

2017-03-09 2 59 09

What do you think about it? :)

from coordinator-example.

wtsnz avatar wtsnz commented on August 19, 2024

Hey @remenkoff!

Thanks so much for this, awesome investigation work there! You're absolutely right, I forgot to mark the delegates as weak in this example 🙃

I'll update the example code with the changes!

from coordinator-example.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.