\ Support for temporary data structures vandys
only extensions definitions
List -> new constant (ephem) scrLocal
: ephem ( a -- a ) dup (ephem) -> add ;
: (cleanEphem) ( 0 a -- ) nip bkfree ; scrLocal
: cleanEphem ( -- ) 0 ['] (cleanEphem) (ephem) -> do
(ephem) -> empty! ;
Object -> :method ephem ( self -- ) ephem drop method;
vandys
Remember bits of allocated memory which we should free "later on"
: ephem Record this bit of memory as ephemeral
: (cleanEphem) Iterator to free out each queued part
: cleanEphem We're "all done", so flush out any accumulated bits of
temporarily allocated memory
Mark object storage ephemeral; subclasses will flag storage under their
instance variables as needed (and then super-> to get this)