Patch for Ticket #2432

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Patch for Ticket #2432

John Galambos-2
Hi all,

I've submitted a patch for ticket #2432:
https://trac.osgeo.org/mapguide/ticket/2432.

This resolves an issue where the HttpWebResponse is not disposed in the
MaestroApi.HttpServerConnection.QueryFeatureSource methods.

Please review. Thanks,

John Galambos
_______________________________________________
mapguide-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-internals
Reply | Threaded
Open this post in threaded view
|

Re: Patch for Ticket #2432

Jackie Ng
Hi John,

I really don't like seeing unbounded System.IO.Stream objects being funnelled into a MemoryStream. Where possible we always want to leverage the underlying stream for any API that expects a System.IO.Stream object instead of copying the contents into a System.IO.MemoryStream and feeding that to the expecting API. It's a recipe for OutOfMemoryExceptions when you have no control over the size of the source System.IO.Stream object.

Could you achieve get the same effect if you pass the response object down to the XmlDataReader or XmlFeatureReader where it can be closed/disposed when the reader itself is closed/disposed?

- Jackie