public void removed(Container cont){
  MapTileFactory tileFactory=getTileFactory();
  if (tileFactory != null) {
    tileFactory.reset();
  }
}

public void removed ( Container cont ) { MapTileFactory tileFactory = getTileFactory ( ) ; if ( tileFactory != null ) { tileFactory . reset ( ) ; } }
called when the layer has been turned off and the projection changes , signifying that the layer can clean up .
