rdeigsler#696
I am having a big memory problem. When I use a web page that has a BitmapViewer, the memory is never released. I dispose of the objects that are created. Below are code snippets.
When the page loads:
And when the page closes I call this remotely and have verified that it executes:
Thank you for your help!
Rick Deigsler
When the page loads:
private void Page_Load(object sender, System.EventArgs e)
{
try
{
if(Request.QueryString["id"] != null)
{
fileID = Convert.ToInt32(Request.QueryString["id"]);
if(Request.QueryString["id"] != "0")
{
objCurrentFile = Files.GetFile(fileID);
bitmap = new Bitmap();
bitmap.Timeout = 60;
bitmap.Load(Server.MapPath(Config.GalleryDirectory + objCurrentFile.Path));
bmvEditor.Bitmap.Create(bitmap);
bitmap.Dispose();
}
bmvEditor.BackColor = System.Drawing.Color.FromArgb(192, 192, 192);
bmvEditor.Bitmap.UndoRedoEnabled = true;
}
}
catch(System.Exception ex)
{
SSP.ExceptionManager.Publish(ex.ToString());
}
}
And when the page closes I call this remotely and have verified that it executes:
[RemoteScriptingMethod]
public void DisposeBitmap()
{
if(bitmap != null)
bitmap.Dispose();
bmvEditor.Bitmap.Dispose();
bmvEditor.Dispose();
}
Thank you for your help!
Rick Deigsler