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

ImageBrowser Show() 弹框关闭后,图片资源未释放,无法删除图片 #1639

Open
childeQL opened this issue Aug 23, 2024 · 1 comment

Comments

@childeQL
Copy link

Describe the bug

ImageBrowser Show() 弹框关闭后,图片资源未释放,无法删除图片

Steps to reproduce the bug

1、代码中创建ImageBrowser对象,注册Closed事件,并弹框展示
string previewImageFullPath = “D:\tmp\imgPreView\test.jpg”
ImageBrowser imageBrowser = new ImageBrowser();
imageBrowser.Closed += ImageBrowser_Closed;
imageBrowser.Show();

2、在Closed事件中删除第一步中预览的图片
if (File.Exists(previewImageFullPath ))
{
File.Delete(previewImageFullPath );
}

Expected behavior

弹框关闭时可以在Closed事件中删除图片,或者弹框关闭后可以删除图片

Screenshots

image

NuGet package version

None

IDE

Visual Studio 2022

Framework type

.Net 6.0

Windows version

No response

Additional context

No response

@Coderyida
Copy link

+1

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

No branches or pull requests

2 participants