MonoBlock constructor copies the value that is given to it on the constructor So, inside map the result value is discarded without being released causing memory leak.
HeterogeneousBlock takes the ownership of the data passed to it through the constructor The same is true for HomogeneousBlock .
There is no reason MonoBlock should behave differently than the other Blocks. Its constructor should be updated to use the data passed to it instead of creating a copy.