// Protected implementation of Dispose pattern.
        protected virtual void Dispose(bool disposing)
        {
            if (disposed)
            {
                return;
            }

            if (disposing)
            {
                // Free any other managed objects here.
            }
            // Free any unmanaged objects here.
            ImageHandleApi.DeleteObject(_handle);
            ImageHandleApi.DeleteObject(_handleCopy);
            disposed = true;
        }
 public void CopyImageAndDoSth()
 {
     _handleCopy = ImageHandleApi.CopyImage(_handle, 0, 0, 0, 0x00000001);
     DoStuff();
 }