Last post Sep 20, 2011 02:08 AM by bfallar3
Sep 03, 2007 08:06 PM|Rasetti|LINK
I have a question about the implementation of a custom temporary storage type for Report using Web Forms:
If I have a simple class like the following,
Public Class ReportsTemporaryStorage
Public Function CreateTemporaryStream() As System.IO.Stream Implements Microsoft.Reporting.WebForms.ITemporaryStorage.CreateTemporaryStream
Dim ms As New IO.MemoryStream
Does anybody know how the ReportViewer disposes the Stream after it ended using it?
Because using MemProfiler I found that the MemoryStreams are left undisposed, thus I'm wondering if it's doing it correctly...
Sep 20, 2011 02:08 AM|bfallar3|LINK
Try using BufferedStream if you are concerned about disposing memory.
public Stream CreateTemporaryStream()
string fullPath = Path.GetTempFileName();
Stream sm = File.Create(fullPath);
BufferedStream stream = new BufferedStream(sm);