View in context in the libbitcoin Slack #general mirror.
free(ptr) on this one shared_ptr<block>, which will be constructed with a deleter that simply calls free on its own address and otherwise does nothing (e.g. no destructors get invoked). This is possible because all objects contained within a block have only default destructors with the exception of std::shared_ptr and std::vector and these only invoke other destructors and/or free the same underlying memory.
Since the objects are all const there is no downstream risk apart from metadata setters, though these should only be used by the code that allocates the block in the first place.
Note that block destruct is 7% of the run cost, even without memory deallocations. So this will more than offset the alloc/copy cost of the implementation.