[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: garbage collection
- To: clisp-list, firstname.lastname@example.org
- Subject: Re: garbage collection
- From: haible (Bruno Haible)
- Date: Fri, 30 Apr 93 11:11:14 +0200
Peter Dudey asks:
> Is there a way to "clear" the interpreter, i.e., remove all user
> definitions and declarations, without exiting and reloading?
Assuming you haven't modified system data structures or created new
packages, this one might help:
(let ((p (find-package "USER")))
(do-symbols (s p) (when (eq (symbol-package s) p) (unintern s p)))
> When I build some horrid, arcane pointer structure, the various items in
> it are subject to garbage collection when and only when there's nothing
> pointing to them . . . right?
Right. In the simplest case you set a global variable to NIL.
It's even simpler if your database is not contained in a global variable