[ Non-logical Variables, Arrays, Bags, Shelves and Stores | Reference Manual | Alphabetic Index ]
Destroy a bag explicitly
- A bag handle
This explicitly destroys a previously created bag object and
frees all its memory. Invoking bag_abolish/1 is optional,
the bag will be automatically destroyed when the system
backtracks across the call to bag_create/1, or when the
BagHandle is no longer needed and gets garbage collected.
bag_dissolve/2 will also destroy the bag.
Using the BagHandle after it has been destroyed will lead
to an error message. Destroying an already destroyed bag
does nothing and is silently accepted.
Modes and Determinism
- (4) instantiation fault
- BagHandle is not instantiated
- (5) type error
- BagHandle is not a bag
- (40) stale object handle
- BagHandle refers to an already destroyed bag
bag_create / 1, bag_enter / 2, bag_count / 2, bag_erase / 1, bag_retrieve / 2, bag_dissolve / 2