OpenLayers OpenLayers

Ticket #1404: increasing_likelyhood_of_typos.patch

File increasing_likelyhood_of_typos.patch, 1.5 kB (added by tschaub, 10 months ago)

still no functional difference

  • lib/OpenLayers/Map.js

    old new  
    545545        } 
    546546        this.viewPortDiv = null; 
    547547 
     548        if(this.eventListeners) { 
     549            this.events.un(this.eventListeners); 
     550            this.eventListeners = null; 
     551        } 
    548552        this.events.destroy(); 
    549553        this.events = null; 
    550554 
  • lib/OpenLayers/Control.js

    old new  
    178178     */ 
    179179    destroy: function () { 
    180180        if(this.events) { 
     181            if(this.eventListeners) { 
     182                this.events.un(this.eventListeners); 
     183            } 
    181184            this.events.destroy(); 
    182185            this.events = null; 
    183186        } 
     187        this.eventListeners = null; 
     188 
    184189        // eliminate circular references 
    185190        if (this.handler) { 
    186191            this.handler.destroy(); 
  • lib/OpenLayers/Layer.js

    old new  
    315315        this.options = null; 
    316316 
    317317        if (this.events) { 
     318            if(this.eventListeners) { 
     319                this.events.un(this.eventListeners); 
     320            } 
    318321            this.events.destroy(); 
    319322        } 
     323        this.eventListeners = null; 
    320324        this.events = null; 
    321325    }, 
    322326