Release Image resources

Hi community,

I am facing an issue with deleting / moving a file (Image) after I load it. I think the reason for that is that Image is still used by the UiPath memory (so it´s locked).

My question is what should I do to release the resource so I can delete the Image.
I tried to invoke Dispose() method, but it didn´t help (probably I done it wrong).
Setting Image variable to Nothing or either loading another Image didn´t help as well.

Sample workflow is here:
image
image
image

And the error:
image

I will really appreciate if you can help me out.

Cheers,
Ed.

Hello,

As the error says this is causing because the image is used by another process, so check which process it’s using and kill that process before deleting.

Thanks,
Meg

Hi megharajky,

Thanks for the response, but actually the process using the file is UiPath robot itself, when I terminate the workflow in studio I can delete the file manually.

Thanks, Ed.

Can I know for what reason you are loading the Image?
Because you can delete Image without loading it too

I need to load image to pass that object to another activity.

This was the solution:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.