void resetDelegate() {
   delegate.reset();
   blockSize = 0;
 }