it may be Garbage Collection issue.
System.GC.Collect();
System.GC.WaitForPendingFinalizers();
File.Delete(picturePath);
More Related Contents:
- Image file copy, is being used by another process
- WPF/C#: Where should I be saving user preferences files?
- How can I read, write, and modify the contents of a notepad (.txt) file, in Winform and WPF? [duplicate]
- The calling thread cannot access this object because a different thread owns it
- Executing Batch File in C#
- How to add System.Windows.Interactivity to project?
- How do I get the current line number?
- How can I get the active screen dimensions?
- How to render a formula in WPF or WinForms
- File I/O with streams – best memory buffer size
- Disposing WPF User Controls
- Is it possible to implement smooth scroll in a WPF listview?
- how to read all files inside particular folder
- How can I read/stream a file without loading the entire file into memory?
- How to check if a file exists in a folder?
- Detect if PDF file is correct (header PDF) [closed]
- How to remove a single Attribute (e.g. ReadOnly) from a File?
- Binding an Image in WPF MVVM
- How to display items in Canvas through Binding
- Binding properties in code behind
- Service starting a process wont show GUI C#
- WPF loading animation on a separate UI thread? (C#)
- How to hide cmd window while running a batch file?
- WPF window from a Console project?
- SendKey.Send() Not working
- Delete files older than 3 months old in a directory using .NET
- C# unsupported grant type when calling web api
- How to fetch string from resource to assign in WPF Resource section in xaml
- Reloading an image in wpf
- How do I resolve the value of a databinding inside a MarkupExtension?