 
 (defonce ^:mutable sonars {})
 
-(declare destroy-sonar)
+(declare destroy-sonar!)
+
+(defprotocol ISonar)
 
 (defprotocol ISonarGet
   (-get [this path]))


  ISonarDispose
  (-dispose [_this]
    (destroy-sonar source))

  ISonarFilter
  (-handle-change [_this _sender oldval newval]

    sonar))

(defn get-or-create-sonar! [source]
  {:post [(satisfies? ISonar %)]}
  (or (get sonars source) (create-sonar! source)))

(defn destroy-sonar! [source]
  {:pre [(get sonars source)]}
  (log "destroyed " (get sonars source))
  (set! sonars (dissoc sonars source)))