db4o |

# Configuration.weakReferences Method

turns weak reference management on or off.

void weakReferences(
bool flag
);

#### Remarks

turns weak reference management on or off.
This method must be called before opening a database.
Performance may be improved by running db4o without using weak references durring memory management at the cost of higher memory consumption or by alternatively implementing a manual memory management scheme using com.db4o.ext.ExtObjectContainer.purge
Setting the value to

    false

causes db4o to use hard references to objects, preventing the garbage collection process from disposing of unused objects.
The default setting is

    true

.
Ignored on JDKs before 1.2.

#### See Also

Configuration Interface | com.db4o.config Namespace