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

Implement IDisposable instead Destroyable in JobsInvoker #76

Conversation

Vixenka
Copy link
Member

@Vixenka Vixenka commented Jul 31, 2022

Closes #72

@Vixenka Vixenka requested a review from kkard2 July 31, 2022 06:48
Comment on lines 16 to 17
public Entity NextEmptyEntity => EntityWorld.NewEntity();
public EntityWorld EmptyEntityWorld => new EntityWorld();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i really dislike the way this is implemented, members appear as properties but they return a new value every time. intent would be expressed better with factory methods, such as CreateNextEmptyEntity and CreateEmptyEntityWorld. NextEmptyEntity is not that bad, but EmptyEntityWorld always returns a new instance (which is not expressed by name) of disposable class, which is expected to be cleaned up by the caller and i find that very unintuitive

@Vixenka Vixenka merged commit 554de36 into master Jul 31, 2022
@Vixenka Vixenka deleted the feature/72/implement-idisposable-instead-destroyable-in-jobs-invoker branch July 31, 2022 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement IDisposable instead Destroyable in JobsInvoker
2 participants