I should add that I never figured out for sure exactly where the memory leak was. But this patch seems to cure it (or at least make it much much less common).