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"); }