flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject [1/2] git commit: [flex-asjs] [refs/heads/develop] - Added method for garbage-collecting QNames
Date Tue, 19 Sep 2017 08:35:13 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop b217e2760 -> ccde57d11


Added method for garbage-collecting QNames


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/6d63604c
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/6d63604c
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/6d63604c

Branch: refs/heads/develop
Commit: 6d63604cee888fe0c37f116ec8a781307bfe60e4
Parents: 94754e0
Author: Harbs <harbs@in-tools.com>
Authored: Tue Sep 19 10:43:33 2017 +0300
Committer: Harbs <harbs@in-tools.com>
Committed: Tue Sep 19 10:43:33 2017 +0300

----------------------------------------------------------------------
 frameworks/projects/XML/src/main/flex/XML.as | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6d63604c/frameworks/projects/XML/src/main/flex/XML.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XML.as b/frameworks/projects/XML/src/main/flex/XML.as
index ccaa67f..229d5f6 100644
--- a/frameworks/projects/XML/src/main/flex/XML.as
+++ b/frameworks/projects/XML/src/main/flex/XML.as
@@ -56,6 +56,16 @@ package
 			}
 			return qname;
 		}
+
+		/**
+		 * Method to free up references to shared QName objects.
+		 * Probably only worth doing if most or all XML instances can be garbage-collected.
+		 */
+		static public function clearQNameCache():void
+		{
+			_nameMap = {};
+		}
+		
 		static private var defaultNamespace:Namespace;
 
 		static public function setDefaultNamespace(ns:*):void


Mime
View raw message