diff options
Diffstat (limited to 'gwtquery-core')
-rw-r--r-- | gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/callbacks/Callbacks.java | 2 | ||||
-rw-r--r-- | gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryDeferredTestGwt.java | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/callbacks/Callbacks.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/callbacks/Callbacks.java index 58992a4e..a91379ab 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/callbacks/Callbacks.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/callbacks/Callbacks.java @@ -120,7 +120,7 @@ public class Callbacks { */ public Callbacks disable() { callbacks = JsObjectArray.create(); - memory = JsObjectArray.create(); + memory = null; done = true; return this; } diff --git a/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryDeferredTestGwt.java b/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryDeferredTestGwt.java index 3f5919a5..9bcc4884 100644 --- a/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryDeferredTestGwt.java +++ b/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryDeferredTestGwt.java @@ -136,6 +136,10 @@ public class GQueryDeferredTestGwt extends GWTTestCase { callbacks.remove( fn1 ); callbacks.add( fn1 ); assertEquals(" f1: bar f2: bar f2: bar f1: bar", result); + callbacks.remove( fn1 ); + callbacks.disable(); + callbacks.add( fn1 ); + assertEquals(" f1: bar f2: bar f2: bar f1: bar", result); } } |