Exemplo n.º 1
0
		public virtual void Test2()
		{
			int size = 20000;
			System.Collections.IDictionary map = new Java.Util.WeakHashMap();
			for (int i = 0; i < size; i++)
			{
				object o = GetSimpleObjectInstance(i);
				if (i % 50000 == 0)
				{
					Println("i=" + i);
				}
				map.Add(System.Convert.ToInt64(i), new Java.Lang.Ref.WeakReference(o));
			}
			Println("Test 2 ok");
			Println("Map size " + map.Count);
		}
Exemplo n.º 2
0
        public virtual void Test2()
		{
			int size = 20000;
			System.Collections.IDictionary map = new Java.Util.WeakHashMap();
			for (int i = 0; i < size; i++)
			{
				object o = GetSimpleObjectInstance(i);
				if (i % 50000 == 0)
				{
					Println("i=" + i);
				}
				map.Add(System.Convert.ToInt64(i), new Java.Lang.Ref.WeakReference(o));
			}
			Println("Test 2 ok");
			Println("Map size " + map.Count);
		}