pmukundan wrote:
Questions :
Does the ksession object get garbage collected immediately ?
Do the persisted task objects/process instance objects get garbage collected ? Those are not required in memory until the user does something about the task in a separate JVM.
As soon as you dispose the session it will be eligible to garbage collection, so I would say yes (with respect to the best practices for garbage collection). Same apply to process and task instances, they will be cleaned up as soon as there are no reference to them and since session is disposed that should be valid.
HTH