diff options
-rw-r--r-- | gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java index 2570f411..ddf72475 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java @@ -171,7 +171,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> { */ private static DocumentStyleImpl styleImpl; - private static RegExp tagNameRegex = RegExp.compile("<([\\w:]+)"); + private static RegExp tagNameRegex = RegExp.compile("<([\\w:-]+)"); /** * Static reference to the Widgets plugin @@ -3848,9 +3848,10 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> { if (name != null) { if (dataCache.exists(id)) { dataCache.getCache(id).delete(name); - } - if (dataCache.getCache(id).isEmpty()) { - removeData(item, null); + if (dataCache.getCache(id).isEmpty()) { + // Save memory + removeData(item, null); + } } } else { // when the element cache is empty we remove its entry to save memory (issue 132) |