Ticket #2096: Shutdown WMS Loader Threads.patch
File Shutdown WMS Loader Threads.patch, 857 bytes (added by , 16 years ago) |
---|
-
src/wmsplugin/WMSLayer.java
62 62 protected String baseURL; 63 63 protected final int serializeFormatVersion = 4; 64 64 65 private ExecutorService executor ;65 private ExecutorService executor = null; 66 66 67 67 public WMSLayer() { 68 68 this(tr("Blank Layer"), null); … … 82 82 83 83 executor = Executors.newFixedThreadPool(3); 84 84 } 85 86 public void destroy() { 87 try { 88 executor.shutdown(); 89 // Might not be initalized, so catch NullPointer as well 90 } catch(Exception x) {} 91 } 85 92 86 93 public void getPPD(){ 87 94 pixelPerDegree = mv.getWidth() / (bounds().max.lon() - bounds().min.lon());