On 8/2/07, German Morales <[EMAIL PROTECTED]> wrote: > Thanks for the hint. > > I use now WebResource, but i couldn't find a class implementing > IResourceStream (which you need to use WebResource) that could get my > byte[] and use it directly. > > There is a StringResourceStream, but then i ended up creating a String and > then the class internally asks for its byte[]. I'm not sure if this can > cause memory consumption. Normally i wouldn't care too much, but being > full PDFs involved, it could be an issue. > > I ended up creating a ByteArrayResourceStream that takes my byte[] and > uses it directly when needed.
Actually, *if* you already use byte[] somewhere, you can use DynamicWebResource just fine. When the resource is serviced, it the resource state object will be closed/ nulled. My remark about streaming is when you create the PDF in a streaming fashion, so that you won't have the whole contents of the PDF in memory (the byte[]) during a request. Is onlly a real issue with large PDFs/ many requests, so holding it in memory for the duration of a request might be fine for your case. Eelco --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
