Delay-related sustained activity in the prefrontal cortex of primates, a neurological analogue of working memory, has been proposed to arise from synaptic interactions in local cortical circuits. The implication is that memories are coded by spatially localized foci of sustained activity. We investigate the mechanisms by which sustained foci are initiated, maintained, and extinguished by excitation in networks of Hodgkin-Huxley neurons coupled with biophysical spatially structured synaptic connections. For networks with a balance between excitation and inhibition, a localized transient stimulus robustly initiates a localized focus of activity. The activity is then maintained by recurrent excitatory AMPA-like synapses. We find that to maintain the focus, the firing must be asynchronous. Consequently, inducing transient synchrony through an excitatory stimulus extinguishes the sustained activity. Such a monosynaptic excitatory turn-off mechanism is compatible with the working memory being wiped clean by an efferent copy of the motor command. The activity that codes working memories may be structured so that the motor command is both the read-out and a direct clearing signal. We show examples of data that is compatible with our theory.