Ticket #606 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

lib/OpenLayers/Feature/Vector.js: destroy() doesn't remove Feature from Layer

Reported by: openlayers Owned by:
Priority: minor Milestone: 2.4 Release
Component: Feature.Vector Version: SVN
Keywords: Cc:
State:

Description

This can cause memory leak.

Index: lib/OpenLayers/Feature/Vector.js
===================================================================
--- lib/OpenLayers/Feature/Vector.js    (révision 2930)
+++ lib/OpenLayers/Feature/Vector.js    (copie de travail)
@@ -74,6 +74,7 @@
      * 
      */
     destroy: function() {
+        this.layer.removeFeatures(this);
         this.geometry = null;
         OpenLayers.Feature.prototype.destroy.apply(this, arguments);
     },

fredj

Change History

Changed 6 years ago by openlayers

  • type changed from feature to bug
  • version set to SVN
  • component changed from general to Feature.Vector

Changed 6 years ago by euzuro

  • milestone set to 2.4 Release

seems like this might be worth taking a look at before 2.4 release, if possible.

Changed 6 years ago by crschmidt

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.