I am using Visual C#
When i open file from my database then an image is loaded in my program,and image source is given below
map.Source = new BitmapImage(new Uri(filePath)); /// filepath is address of image from datebase
and when replace it by another image. The new image is loaded in my picture box,
then map.Source = new BitmapImage(new Uri(filePath)); //filepath is address of new image from disk
and when i try to delete previous image from my database then it show a message that the previous is being used.
How can I make image source of previous image free??