public class WeakStep
WeakStep is a wrapper for steppable objects in the situation where we only want
the schedule to tenuously hold onto the steppable object -- that is, if everyone
else has forgotten about the object, the schedule should as well. This is commonly
the case for inspectors and other kinds of windows which might be closed by the user
without any way to get back to the schedule and remove themselves.
You schedule a Steppable weakly something like this:
A WeakStep can also wrap a Steppable you plan on scheduling repeating. You'd
do it along these lines:
WeakStep weak = new WeakStep(mySteppable);
Stoppable stop = mySchedule.scheduleRepeating(weak);
In this case, when the underlying Steppable is garbage-collected, then the
schedule will automatically stop repeatedly stepping it. Note that the Stoppable
is not stored weakly.