I do believe you are leaking 1 MgByteReader per call. Here is the definition of the function call:
public virtual *MgByteReader* CreateRuntimeMap(MgResourceIdentifier mapDefinition, string sessionId, int requestedFeatures, int iconsPerScaleRange); It returns a MgByteReader. I strongly recommend putting it in a variable and calling Dispose() directly on it. Odds are you are holding on to a bunch of MgByteReader and the delay is the time the garbage collector takes to manually dispose those objects. My second recommendation would be to maybe not use CreateRuntimeMap. You are not using the returned map definition whatsoever. You may as well just create an MgMap and MgSelection directly and avoid some unecessary processing? CreateRuntimeMap is useful when you want to have more information about the map, including having Base64 icons for layers for a legend type control. It doesn't look like this is the case for you. Cheers, Ben -- View this message in context: http://osgeo-org.1560.x6.nabble.com/30-seconds-delay-after-creating-100-CreateRuntimeMap-calls-tp5309691p5310195.html Sent from the MapGuide Users mailing list archive at Nabble.com. _______________________________________________ mapguide-users mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/mapguide-users
