aarons@syma.sussex.ac.uk (Aaron Sloman) (08/12/90)
skp@stl.stc.co.uk (Steve Perryman ) writes: > Date: 9 Aug 90 07:46:25 GMT > Organization: STC Technology Limited, London Road, Harlow, Essex, UK > > Is there a standard destructor function in Common Lisp or CLOS ??? > There is no mention of one in Sonya Keene's book on CLOS, but is there one/ > going to be one (in current standards etc) ?? > > I have crashed my application cos it creates reams of temporary objects that > need to be destroyed after their use, and the garbage collector cannot > handle it. My lisp system has a destructor function but it is definitely > non-standard and I want to use something more standard if possible. > > Thanks in advance, > > Steven Perryman > (skp@stl.stc.co.uk) For information, Poplog (since V13.6) introduced the concept of a destroy_action. These are implemented via an extension to the property mechanism. Here is an extract from the online "REF PROPS" file: ------------------------------------------------------------------- Destroy properties thus allow arbitrary procedures to be attached to objects in such a way that the procedure gets run, with the object as argument, at the point at which the object would otherwise have become garbage (the point of its destruction). ------------------------------------------------------------------- This mechanism is available for all the Poplog languages (Common Lisp, Pop-11, Prolog, ML) via the Pop-11 interface. For example it allows you to ensure that if certain program items have windows or icons on the screen associated with them, then those screen objects are automatically removed if ever the program items become garbage. Aaron Sloman, School of Cognitive and Computing Sciences, Univ of Sussex, Brighton, BN1 9QH, England EMAIL aarons@cogs.sussex.ac.uk or: aarons%uk.ac.sussex.cogs@nsfnet-relay.ac.uk