[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do I destroy objects?

I am programming a neural network simulation in flavors (Release 6.2).
I implement pulses traveling through wires as follows: a wire is an
instance of the flavor "wire".  Wires have an instance variable
"pulses".  The value of pulses for a wire is a list of uninterned
symbols (created by gensym).  The value of each symbol in this list is
an object of type "pulse" and represents a pulse currently traveling
in the wire.  Thus, when a pulse enters the wire (for example from a
neuron) a symbol and pulse object are created.    When the pulse
subsequently leaves the wire I remove its symbol from the pulses
list and everything simulates fine.   However, I'm concerned about
the fact that I'm accumulating a large number of useless pulse
objects.   Any suggestions about the correct way to turn these
into garbage?