db4o |

# ExtObjectContainer.Purge Method (Object)

unloads a specific object from the db4o reference mechanism.

void Purge(
object obj
);

#### Parameters

obj
  the object to be removed from the reference mechanism.

#### Remarks

unloads a specific object from the db4o reference mechanism.
db4o keeps references to all newly stored and instantiated objects in memory, to be able to manage object identities.
With calls to this method it is possible to remove an object from the reference mechanism, to allow it to be garbage collected. You are not required to call this method in the .NET and JDK 1.2 versions, since objects are referred to by weak references and garbage collection happens automatically.
An object removed with

    purge(Object)

is not "known" to the

    ObjectContainer

afterwards, so this method may also be used to create multiple copies of objects.

    purge(Object)

has no influence on the persistence state of objects. "Purged" objects can be reretrieved with queries.

#### See Also

ExtObjectContainer Interface | com.db4o.ext Namespace | ExtObjectContainer.Purge Overload List