Out of curiosity: doesn't this cause a memory leak? Or is ownership of the pointed-to transferred earlier?