-
Notifications
You must be signed in to change notification settings - Fork 143
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
PrintSCP Releasing memory before its finished #35
Labels
Comments
This requires changes in fo-dicom. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PROBLEM:
When PrintSCP receives an N-Delete request it frees memory that may still be in use by the worker print thread, resulting in a memory violation. I think is related to a bug in the Image code which is already known.
WORKAROUND:
In PrintJob.cs line 241 the current code is:
Replacing all of the above with:
Solves the issue for me, as it lets the printing finish before responding, and so the N-DELETE gets called when its safe to dispose of the memory (AFAIK). The only problem I can see is if the other services calls N-DELETE before waiting for a response then this can also fail, but I don't think this is likely. Ideally there should be some check in N-DELETE to makes sure it's safe to release everything - best in the underlying image classes so they can be deleted but not garbage collected.
The text was updated successfully, but these errors were encountered: