September 2001
Intermediate to advanced
768 pages
32h 45m
English
bool shm_remove(int shm_id) Removes a shared memory segment from the system.
Returns:
TRUE on success; FALSE on failure
Description:
shm_remove() removes the shared memory segment identified by shm_id from the system, destroying its contents and freeing its memory. shm_id must be a valid identifier as returned by shm_attach().
Note that the segment isn’t necessarily deleted immediately. Rather, it’s marked for deletion, and is destroyed and its memory freed only after the last process to be attached to it has detached from it.
Version:
PHP 3 since 3.0.6, PHP 4
See also:
shm_attach() shm_detach() shm_get_var() shm_put_var() shm_remove_var()
Example:
if (!@shm_remove($shm_id)) { echo "Failed to remove ... |
Read now
Unlock full access