Because it's named "temp_image" it's likely that it contains pictures your application is using - and that's probably the problem.
If you use Image.FromFile or similar, then it acquires a lock on the file until the Image is Disposed (it's all in teh documentation:
Image.FromFile Method (String) (System.Drawing)[
^] - see the Remarks section)
So look at the rest of your code, and how you are handling the images and files - until you have corrected that, you can't delete the folder as your application is using files inside it.