Is this introducing a memory leak elsewhere?