Destroy a Berkeley DB environment if it is not currently in use.

Namespace:  BerkeleyDB
Assembly:  libdb_dotnet52 (in libdb_dotnet52.dll) Version: 5.2.28.0

Syntax

C#
public static void Remove(
	string db_home,
	bool force
)
Visual Basic (Declaration)
Public Shared Sub Remove ( _
	db_home As String, _
	force As Boolean _
)
Visual C++
public:
static void Remove(
	String^ db_home, 
	bool force
)

Parameters

db_home
Type: System..::.String
The database environment to be removed.
force
Type: System..::.Boolean
If true, the environment is removed, regardless of any processes that may still using it, and no locks are acquired during this process.

Remarks

Generally, force is specified only when applications were unable to shut down cleanly, and there is a risk that an application may have died holding a Berkeley DB lock.)

The result of attempting to forcibly destroy the environment when it is in use is unspecified. Processes using an environment often maintain open file descriptors for shared regions within it. On UNIX systems, the environment removal will usually succeed, and processes that have already joined the region will continue to run in that region without change. However, processes attempting to join the environment will either fail or create new regions. On other systems in which the unlink(2) system call will fail if any process has an open file descriptor for the file (for example Windows/NT), the region removal will fail.

See Also