## `module::displace` -- unloads a module

#### Introduction

`module::displace``(name)` unloads a dynamic module.

#### Call(s)

`module::displace(name <, Force>)`
`module::displace()`

#### Parameters

`name` | - | module name: character string, identifier or module domain

#### Options

`Force` | - | forces the module manager to unload a static module.

#### Returns

the void object of type `DOM_NULL`.

#### Side Effects

The machine code of modules is unloaded transparently to the user. It especially does not affect the module domains. The machine code is reloaded automatically if it is needed later.

The function `reset` unloads all dynamic modules.

#### Related Functions

`external`, `loadmod`, `module::age`, `module::new`, `module::stat`, `unloadmod`

#### Details

- `module::displace``(name)` uses the kernel function `unloadmod` to unload a module.

#### Example 1

Dynamic Modules can be unloaded at runtime to save memory resources or to change and re-compile it (rapid prototyping). However, its machine code is reloaded on demand.

    >> module("stdmod"):
       module::displace(stdmod):
       stdmod::which("stdmod")

          "/usr/local/mupad/linux/modules/stdmod.mdm"

#### Background

- More detailed information are available with the kernel functions `loadmod`, `unloadmod` and `external`.

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000