[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
expunging objects from dynamic windows
Date: Fri, 22 Jan 88 11:03 EST
From: Jeffrey Mark Siskind <Qobi@ZERMATT.LCS.MIT.EDU>
I really like the dynamic windows of Genera 7.0, except
there is at least one thing one has to be aware of. The
dynamic lisp listener provides two *separable* (at least
conceptually) feature: scrolling, ... and mouse sensitivity
for things like Mouse-M (describe ...). The thing one has
to be weary of is that if you print out an object like
#<FOO 777777777> that object can't get garbage collected.
If your objects are highly intertwined then if you even
print out *one* temporary object, say while debugging,
that has a handle on all the other temporary objects
which you have created, then you lose because nothing
will be GCed. Now you can of course do a :Clear Output History
but that has two problems. First, you lose scrolling
along with mouse sensitivity. Second, if you forget to
do a :Clear Output History, or if you are running a long
program that is dumping a lot of trace output you lose
because if the EGC flips enough times before you get
a chance to do a :Clear Output History the object move
high enough in the Ephemeral levels to never be collected.
There are four solutions which I suggest that Symbolics
implement, each being an improvement on the previous one.
First, provide a command which can clear the objects
associate with a window without clearing the scrolling
history. This means changing all object references to
presentation string references in the window history.
This and more is done in 7.2, via the :Cleanup option to the :Start GC
Second, provide a command which will clear the
scrolling and/or object history of window except
for the last N pages.
In 7.2, there are options to the :Clear Output History command which do
that and more.
Third, provide a switch setting which I can set to
ask that objects never be associated with a window,
just their presentation strings. I can set such a
switch when I know that I am doing debugging tracing
output and want scrolling history but can forgo
(dw:with-output-as-presentation (:allow-sensitive-inferiors nil)
Ideally, I could set this to
automatically preserve only the last N pages
of object history and only the last M pages of
scrolling history where M>=N.
Fourth, provide a switch setting where the EGC was
smart enough to automatically purge object references
more than N pages back just before it did a flip.
This way I could get the best of all worlds until
a flip came.
I don't believe that EGC should be destructive behind your back.
Certainly slowing it down by making it loop over every window ever
created would unacceptable to most people.
Anyway, it's fairly simple to implement such a thing in 7.2, if you
really wanted to. Just put the form which does the work onto
It would be nice if you were running 7.1. Anyway, thanks for the
Anybody feel like hacking this?