Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The use of System.Drawing.Bitmap
Message
From
08/09/2006 16:44:24
 
 
To
08/09/2006 15:50:15
General information
Forum:
ASP.NET
Category:
Pictures and Image processing
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01152456
Message ID:
01152462
Views:
29
I'm not sure why the image remains locked. But I do know that System.Drawing namespace runs in unmanaged code, so you have to manually call dispose and delete the bitmap object.


>When we use System.Drawing.Bitmap, even if the class is released from memory after being out of scope, we still have to force a call to the Dispose() method to release the file. Otherwise, the file remained locked on disk for a while and we cannot replace the image. Can someone explain why this is necessary? What is going on internally in that System.Drawing.Bitmap exactly which forces such a call? I understand such a call could be useful down the code below if we would want to reassign a new image and such. But, when the object does out of scope, I was curious to know why the image remained locked on disk.

(On an infant's shirt): Already smarter than Bush
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform