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

Why not support an API that can break up circular reference of a Machine object ? #690

Open
dokiyi opened this issue Sep 18, 2024 · 0 comments
Assignees

Comments

@dokiyi
Copy link

dokiyi commented Sep 18, 2024

An example start from here :

from transitions import Machine
customMachine = Machine()

There are serial circular reference in the new object customMachine, for example customMachine.models is referenced by customMachine while customMachine is also referenced by customMachine.models‘scustomMachine.models[0]. Some functions.partial object in customMachine is similar too.

The object customMachine will not be recycle as soon as all its references, which is held by application, are released. Side effect can be control with cpython's gc work properly, but extreme case might exist though...

Why not support an API that can break up those circular reference of a Machine object? Or if I'm rude, from the view of developer, Is there appropriate way to help application to break up circular reference in some case correctly?

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

No branches or pull requests

2 participants