How does the Delay block work in Gnuradio
I am reading the source code for block Delay in gnuradio,but I don't understand the following code.
std::memset(optr, 0, n_padding * d_itemsize);
std::memcpy(optr, iptr, n_from_input * d_itemsize);
It seems that they operate on the same pointer 'optr',0 is overwritten by the 'iptr'. I want to add delay to my oot module,I need to know how this code works.