Weak References

Each retrieved or created object is automatically placed into reference system. Of course you have control over it and can purge or deactivate retrieved objects to prevent ever-growing memory consumption. However this requires a lot of attention and coding effort. Luckily, this is not necessary as db4o offers much easier way to manage the memory - WeakReferences.

Any object is kept in the memory while application has references to it otherwise it becomes eligible for garbage collection.

In the default configuration db4o uses weak references and a dedicated thread to clean them up after objects have been garbage collected by the VM. Weak references need extra resources and the cleanup thread will have a considerable impact on performance since it has to be synchronized with the normal operations within the ObjectContainer.