From a3ffb5734cc2fe2a0cdc02cf5ca449ce042b1172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Junod?= Date: Mon, 4 Aug 2008 12:25:47 +0000 Subject: [PATCH] OpenLayers.Strategy destroy() nullify options property. r=elemoine (closes #1657) git-svn-id: http://svn.openlayers.org/trunk/openlayers@7690 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Strategy.js | 1 + tests/Strategy.html | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Strategy.js b/lib/OpenLayers/Strategy.js index f0e1afb691..d5efe93572 100755 --- a/lib/OpenLayers/Strategy.js +++ b/lib/OpenLayers/Strategy.js @@ -41,6 +41,7 @@ OpenLayers.Strategy = OpenLayers.Class({ destroy: function() { this.deactivate(); this.layer = null; + this.options = null; }, /** diff --git a/tests/Strategy.html b/tests/Strategy.html index ff59028c3c..3f8ebe5bf5 100644 --- a/tests/Strategy.html +++ b/tests/Strategy.html @@ -14,13 +14,15 @@ } function test_destroy(t) { - t.plan(1); + t.plan(2); var strategy = new OpenLayers.Strategy({ + options: {foo: 'bar'}, layer: 'foo' }); strategy.destroy(); t.eq(strategy.layer, null, "destroy nullify protocol.layer"); + t.eq(strategy.options, null, "destroy nullify protocol.options"); }