While resolving a lot of rather huge dependency trees in my application I observed a high heap consumption by org.eclipse.aether.internal.impl.collect.DataPool.
The DataPool holds Descriptor references in a WeakHashMap.
Unfortunately, the key is indirectly referenced by the value - thus is is never eligible for garbage collection.
The key is an Artifact taken from the ArtifactDescriptorRequest.
The value is an ArtifactDescriptorResult which references the Artifact (key) and the ArtifactDescriptorRequest.
To fix this the value should be wrapped in a WeakReference or SoftReference.
This is what the ObjectPools does which is used by the DataPool for Artifacts and Dependencies.
My use case is an application that indexes the dependency trees of all our services. Therefore there is a lot of dependency resolution when building the index.
I implemented a workaround by wrapping the value in a WeakReference. The memory consumption is significantly lower afterwards as shown by the attached screenshots.
If desired, I would create a pull request, but I haven't set up a maven workspace yet.