     @svm*)
   Releaseable
   (release [this]
-    (locking this
+    (locking svm*
       (when-let [ss @svm*]
         (locking ss
           (CL/clSVMFree ctx ss)

         (deref ref#))
       Releaseable
       (release [this#]
         (locking this#
           (when-let [d# (deref ref#)]
             (locking d#
               (with-check (~release-method d#) (vreset! ref# nil)))))

    @cl)
  Releaseable
  (release [this]
    (locking cl
      (when-let [c @cl]
        (locking c
          (with-check (CL/clReleaseMemObject c)
