danielgerlag / workflow-core

Lightweight workflow engine for .NET Standard
MIT License
5.34k stars 1.19k forks source link

Workflow instance is not disposed when using InMemory Persistence #772

Open narayansharmadotnet opened 3 years ago

narayansharmadotnet commented 3 years ago

I found a memory leak issue when running the workflow and looks like the workflow instance is not disposed atfer its completed. I am using InMemory persistence option. Could you please suggest what is the best way to dispose the completed workflow instance ? Thank you.

Ungerfall commented 3 years ago

I just added an additional step at the end of a workflow which .Clear() or = null collections from Data

.Then(Clean)
    .OnError(WorkflowErrorHandling.Terminate)
.EndWorkflow();