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

How do I destroy objects?



 From your description, this sounds like one of those cases in which you
can easily tell when a data object is being deallocated.  (I'm guessing
that a pulse can only be on one wire, and nothing else in the data
structure refers ("points") to them.)  If so, then you can manually
"deallocate" them by using resources.  The idea would be to keep a
resource (a pool) of pulse instances, returning them to the resource
explicitly when the pulse exits a wire.  Then, when you need a new
pulse, you find one in the resource.  Look up the documentation topic
"Resources" in the Document Examiner.

I couldn't figure out from your description what the purpose of the
uninterned symbols is.  I would have thought that the "pulses" instance
variable would simply contain a list of pulses.  Anyway, if you need
the symbols as well, you'd keep a resource each of whose items is a
symbol whose value is a pulse instance.