destroy() {
    return new Promise((resolve, reject) => {
      if (!this.kernels) {
        resolve();
      }
      // perform on next run loop - for some reason we dont get lose context events
      // if webGl is created and destroyed in the same run loop.
      setTimeout(() => {
        try {
          for (let i = 0; i < this.kernels.length; i++) {
            this.kernels[i].destroy(true); // remove canvas if exists
          }
          // all kernels are associated with one context, go ahead and take care of it here
          let firstKernel = this.kernels[0];
          if (firstKernel) {
            // if it is shortcut
            if (firstKernel.kernel) {
              firstKernel = firstKernel.kernel;
            }
            if (firstKernel.constructor.destroyContext) {
              firstKernel.constructor.destroyContext(this.context);
            }
          }
        } catch (e) {
          reject(e);
        }
        resolve();
      }, 0);
    });
  }
@desc Destroys all memory associated with gpu.js & the webGl if we created it
@return {Promise}
@resolve {void}
@reject {Error}