I'm using dotSpatials Map object to do some operations on a shape file. My program eats up memory when I'm using the code below to add a layer (MapLineLayer) and when I'm done with the layer I want my memory back. I can't manage to dispose of my Map object and it's layers.
Map map = new Map {Projection = ProjectionInfo.FromEpsgCode(epsgCode)};
try
{
map.AddLayer(filePath);
}
How can I properly dispose dotSpatials Map?