cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r478020 - /incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectStore.java
Date Wed, 22 Nov 2006 03:27:16 GMT
Author: aadamchik
Date: Tue Nov 21 19:27:15 2006
New Revision: 478020

URL: http://svn.apache.org/viewvc?view=rev&rev=478020
Log:
CAY-709: Leak-free ObjectContext
(deprecating manual refrence counter)

Modified:
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectStore.java

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectStore.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectStore.java?view=diff&rev=478020&r1=478019&r2=478020
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectStore.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectStore.java
Tue Nov 21 19:27:15 2006
@@ -84,8 +84,6 @@
         return new ReferenceMap(AbstractReferenceMap.HARD, AbstractReferenceMap.WEAK);
     }
 
-    protected transient Map newObjectsMap;
-
     protected Map objectMap;
     protected Map changes;
 
@@ -499,10 +497,11 @@
      * conjunction with unregisterNewObjects() to control garbage collection when an
      * instance of ObjectStore is used over a longer time for batch processing.
      * 
-     * @see org.apache.cayenne.access.ObjectStore#unregisterNewObjects()
+     * @deprecated since 3.0 as ObjectStore holds weak reference to unmodified objects and
+     *             this feature is useless.
      */
     public synchronized void startTrackingNewObjects() {
-        newObjectsMap = new HashMap();
+        // noop
     }
 
     /**
@@ -510,13 +509,11 @@
      * conjunction with startTrackingNewObjects() to control garbage collection when an
      * instance of ObjectStore is used over a longer time for batch processing.
      * 
-     * @see org.apache.cayenne.access.ObjectStore#startTrackingNewObjects()
+     * @deprecated since 3.0 as ObjectStore holds weak reference to unmodified objects and
+     *             this feature is useless.
      */
     public synchronized void unregisterNewObjects() {
-        if (newObjectsMap != null) {
-            objectsUnregistered(newObjectsMap.values());
-            newObjectsMap = null;
-        }
+        // noop
     }
 
     /**
@@ -968,10 +965,6 @@
      */
     public void registerNode(Object nodeId, Object nodeObject) {
         objectMap.put(nodeId, nodeObject);
-
-        if (newObjectsMap != null) {
-            newObjectsMap.put(nodeId, nodeObject);
-        }
     }
 
     /**



Mime
View raw message