WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

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

@dokiyi

Description

@dokiyi

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?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions