Hi Paul,
I created a sample that wants to reproduce your problem but with no luck, the memory usage is not increased, could you look at it?
Bitmap bitmap = new Bitmap(@"..\..\SampleData\Data\United States.png");
bitmap.MakeTransparent(Color.Black);
MemoryStream stream = new MemoryStream();
bitmap.Save(stream, System.Drawing.Imaging.ImageFormat.Png);
GeoImage geoimage = new GeoImage(stream);
InMemoryFeatureLayer bitmapLayer = new InMemoryFeatureLayer();
bitmapLayer.Open();
bitmapLayer.Columns.Add(new FeatureSourceColumn("key"));
bitmapLayer.Close();
PointStyle pointStyle = new PointStyle(geoimage);
ValueStyle valueStyle = new ValueStyle();
valueStyle.ColumnName = "key";
valueStyle.ValueItems.Add(new ValueItem("value", pointStyle));
bitmapLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(valueStyle);
bitmapLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
byte[] wkb = new PointShape(-95.2806, 38.9554).GetWellKnownBinary();
for (int i = 0; i < 1000; i++)
{
Feature feature = new Feature(wkb, Guid.NewGuid().ToString(), new string[] { "key:value" });
bitmapLayer.InternalFeatures.Add(Guid.NewGuid().ToString(), feature);
}
LayerOverlay overlay = new LayerOverlay();
overlay.Layers.Add(bitmapLayer);
winformsMap1.Overlays.Add(overlay);
winformsMap1.CurrentExtent = new RectangleShape(-165.946875, 86.4359375, -35.86875, -6.3765625);
winformsMap1.Refresh();
Thanks,
James