Lines 9-14
Link Here
|
9 |
* IBM Corporation - initial API and implementation |
9 |
* IBM Corporation - initial API and implementation |
10 |
* Martin Oberhuber (Wind River) - [105554] handle cyclic symbolic links |
10 |
* Martin Oberhuber (Wind River) - [105554] handle cyclic symbolic links |
11 |
* Martin Oberhuber (Wind River) - [232426] shared prefix histories for symlinks |
11 |
* Martin Oberhuber (Wind River) - [232426] shared prefix histories for symlinks |
|
|
12 |
* Martin Oberhuber (Wind River) - [292267] OutOfMemoryError due to leak in UnifiedTree |
12 |
*******************************************************************************/ |
13 |
*******************************************************************************/ |
13 |
package org.eclipse.core.internal.localstore; |
14 |
package org.eclipse.core.internal.localstore; |
14 |
|
15 |
|
Lines 107-114
Link Here
|
107 |
addNodeChildrenToQueue(node); |
108 |
addNodeChildrenToQueue(node); |
108 |
else |
109 |
else |
109 |
removeNodeChildrenFromQueue(node); |
110 |
removeNodeChildrenFromQueue(node); |
110 |
//allow reuse of the node |
111 |
//allow reuse of the node, but don't let the freeNodes list grow infinitely |
111 |
freeNodes.add(node); |
112 |
if (freeNodes.size() < 32767) { |
|
|
113 |
//free memory-consuming elements of the node for garbage collection |
114 |
node.releaseForGc(); |
115 |
freeNodes.add(node); |
116 |
} |
117 |
//else, the whole node will be garbage collected since there is no |
118 |
//reference to it any more. |
112 |
} |
119 |
} |
113 |
} |
120 |
} |
114 |
|
121 |
|
Lines 171-177
Link Here
|
171 |
} else if (comp > 0) { |
178 |
} else if (comp > 0) { |
172 |
// resource exists only in file system |
179 |
// resource exists only in file system |
173 |
//don't create a node for symbolic links that create a cycle |
180 |
//don't create a node for symbolic links that create a cycle |
174 |
if (!localInfo.getAttribute(EFS.ATTRIBUTE_SYMLINK) || !localInfo.isDirectory() || !isRecursiveLink(node.getStore(), localInfo)) |
181 |
if (localInfo.getAttribute(EFS.ATTRIBUTE_SYMLINK) && localInfo.isDirectory() && isRecursiveLink(node.getStore(), localInfo)) |
|
|
182 |
child = null; |
183 |
else |
175 |
child = createChildNodeFromFileSystem(node, localInfo); |
184 |
child = createChildNodeFromFileSystem(node, localInfo); |
176 |
localIndex++; |
185 |
localIndex++; |
177 |
} else { |
186 |
} else { |