This site contains older material on Eiffel. For the main Eiffel page, see http://www.eiffel.com.

Table of Contents Previous Chapter

5.17 Class MEMORY

indexing
    description: "Facilities for tuning up the garbage collection mechanism. This class may be used as ancestor by classes needing its facilities."
class interface
    MEMORY
feature -- Status report
    collecting: BOOLEAN
-- Is garbage collection enabled?
feature -- Status setting
    collection_off
-- Disable garbage collection.
    collection_on
-- Enable garbage collection.
feature -- Removal
    dispose
-- Action to be executed just before garbage collection
-- reclaims an object.
-- Default version does nothing; redefine in descendants
-- to perform specific dispose actions. Those actions
-- should only take care of freeing external resources;
-- they should not perform remote calls on other objects
-- since these may also be dead and reclaimed.
    full_collect
-- Force a full collection cycle if garbage
-- collection is enabled; do nothing otherwise.
end

Table of Contents Next Chapter